1 2017-11-27 Tom Tromey <tom@tromey.com>
3 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
5 (SFILES): Use SUBDIR_TARGET_SRCS.
6 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
7 (CONFIG_SRC_SUBDIR): Add target.
8 (%.o): Remove target rule.
10 2017-11-27 Tom Tromey <tom@tromey.com>
12 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
13 registry.o, thread-fsm.o, debug.o.
14 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
15 thread-fsm.c, debug.c.
17 2017-11-27 Tom Tromey <tom@tromey.com>
19 * Makefile.in (COMMON_SFILES): New.
20 (SFILES): Move some entries to COMMON_SFILES.
21 (COMMON_OBS): Use COMMON_SFILES.
23 2017-11-27 Tom Tromey <tom@tromey.com>
25 * Makefile.in (YYFILES): Update comment.
28 2017-11-27 Tom Tromey <tom@tromey.com>
30 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
31 (CONFIG_SRC_SUBDIR): Add python.
32 (%.o): Remove python rule.
33 (python/%.o): New rule.
35 * configure.ac (CONFIG_OBS): Refer to python/python.o
37 2017-11-27 Tom Tromey <tom@tromey.com>
40 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
41 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
42 (CONFIG_SRC_SUBDIR): Add guile.
43 (%.o): Remove guile rule.
45 2017-11-27 Tom Tromey <tom@tromey.com>
47 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
48 (%.o): Remove unittests rule.
49 (CONFIG_SRC_SUBDIR): Add unittests.
51 2017-11-27 Tom Tromey <tom@tromey.com>
53 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
54 (CONFIG_SRC_SUBDIR): Add tui.
55 (%.o): Remove tui rule.
57 2017-11-27 Tom Tromey <tom@tromey.com>
59 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
60 (%.o): Remove compile rule.
61 (CONFIG_SRC_SUBDIR): Add compile.
63 2017-11-27 Tom Tromey <tom@tromey.com>
65 * Makefile.in (SUBDIR_MI_OBS): Redefine.
66 (%.o): Remove mi rule.
67 (CONFIG_SRC_SUBDIR): Add mi.
68 (COMMON_OBS): Use mi/mi-common.o
70 2017-11-27 Tom Tromey <tom@tromey.com>
72 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
73 (%.o): Remove cli rule.
74 (CONFIG_SRC_SUBDIR): Add cli.
76 2017-11-27 Tom Tromey <tom@tromey.com>
78 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
80 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
81 (CONFIG_DEP_SUBDIR): New variable.
82 (%.o): Add order-only dependency.
83 ($(CONFIG_DEP_SUBDIR)): New target.
85 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
88 * findcmd.c (_initialize_mem_search): Update find command help
91 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
93 * python/python.c (do_start_initialization): Change progname
94 type to gdb::unique_xmalloc_ptr. Release the pointer when using
97 2017-11-26 Tom Tromey <tom@tromey.com>
99 * common/format.h: Add include guards.
101 2017-11-26 Tom Tromey <tom@tromey.com>
103 * nat/linux-personality.h (class
104 maybe_disable_address_space_randomization): New class.
105 (maybe_disable_address_space_randomization): Don't declare
107 * nat/linux-personality.c (restore_personality)
108 (make_disable_asr_cleanup): Remove.
109 (maybe_disable_address_space_randomization): Now a constructor.
110 (~maybe_disable_address_space_randomization): New destructor.
111 * linux-nat.c (linux_nat_create_inferior): Update.
113 2017-11-26 Tom Tromey <tom@tromey.com>
115 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
117 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
119 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
120 "cooked" register. Access only first four bytes of branch target
123 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
126 * stap-probe.c (relocate_address): New function.
127 (stap_probe::get_relocated_address): Use 'relocate_address'.
128 (stap_probe::set_semaphore): Use 'relocate_address' and pass
130 (stap_probe::clear_semaphore): Likewise.
132 2017-11-25 Pedro Alves <palves@redhat.com>
134 * dictionary.c: Include "safe-ctype.h".
135 * minsyms.c: Include "safe-ctype.h".
136 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
138 2017-11-25 Pedro Alves <palves@redhat.com>
140 * completer.c (complete_line_internal_1): Skip spaces until the
141 start of the command.
143 2017-11-24 Pedro Alves <palves@redhat.com>
145 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
146 cp_fq_symbol_name_matches. Pass language_cplus to
148 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
149 (selftests::test_cp_symbol_name_cmp): New.
150 (_initialize_cp_support): Register "cp_symbol_name_matches"
152 * language.c (default_symbol_name_matcher): Pass language_minimal
153 to strncmp_iw_with_mode.
154 * utils.c: Include "cp-support.h" and <algorithm>.
155 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
156 (cp_is_operator): New functions.
157 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
158 skip whitespace in the symbol name when the lookup name doesn't
159 have spaces, and vice versa.
160 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
161 * utils.h (strncmp_iw_with_mode): Add language parameter.
163 2017-11-24 Joel Brobecker <brobecker@adacore.com>
165 * ada-lang.c (ada_exception_message_1, ada_exception_message):
167 (print_it_exception): If available, display the exception
169 * NEWS: Document new feature.
171 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
173 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
175 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
177 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
178 (dtrace_probe::is_enabled, dtrace_probe::enable)
179 (dtrace_probe::disable): Remove keyword 'struct' at for-range
181 * probe.c (gen_ui_out_table_header_info)
182 (print_ui_out_not_applicables): Remove keyword 'struct' at
185 2017-11-24 Alan Hayward <alan.hayward@arm.com>
187 * configure.tgt: Add arch/aarch64.o
189 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
191 * common/common-utils.h: Include poison.h.
192 (xfree): Remove declaration, add definition with static_assert.
193 * common/common-utils.c (xfree): Remove.
194 * common/poison.h (IsMallocatable): Define.
195 (IsFreeable): Define.
196 (free): Delete for non-freeable types.
198 (XNEW): Undef and redefine.
200 (XCNEW): Undef and redefine.
202 (XDELETE): Undef and redefine.
204 (XNEWVEC): Undef and redefine.
206 (XCNEWVEC): Undef and redefine.
208 (XRESIZEVEC): Undef and redefine.
210 (XDELETEVEC): Undef and redefine.
212 (XNEWVAR): Undef and redefine.
214 (XCNEWVAR): Undef and redefine.
216 (XRESIZEVAR): Undef and redefine.
218 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
220 * gdbthread.h (private_thread_info): Define structure type, add
221 virtual pure destructor.
222 (thread_info) <priv>: Change type to unique_ptr.
223 <private_dtor>: Remove.
224 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
225 (private_thread_info::~private_thread_info): Provide default
227 (thread_info::~thread_info): Don't call private_dtor nor
229 * aix-thread.c (private_thread_info): Rename to ...
230 (aix_thread_info): ... this.
231 (get_aix_thread_info): New.
232 (sync_threadlists): Adjust.
234 (aix_thread_resume): Adjust.
235 (aix_thread_fetch_registers): Adjust.
236 (aix_thread_store_registers): Adjust.
237 (aix_thread_extra_thread_info): Adjust.
238 * darwin-nat.h (private_thread_info): Rename to ...
239 (darwin_thread_info): ... this.
240 (get_darwin_thread_info): New.
241 * darwin-nat.c (darwin_init_thread_list): Adjust.
242 (darwin_check_new_threads): Adjust.
243 (thread_info_from_private_thread_info): Adjust.
244 * linux-thread-db.c (private_thread_info): Rename to ...
245 (thread_db_thread_info): ... this, initialize fields.
246 (get_thread_db_thread_info): New.
247 <dying>: Change type to bool.
248 (update_thread_state): Adjust to type rename.
249 (record_thread): Adjust to type rename an use of unique_ptr.
250 (thread_db_pid_to_str): Likewise.
251 (thread_db_extra_thread_info): Likewise.
252 (thread_db_thread_handle_to_thread_info): Likewise.
253 (thread_db_get_thread_local_address): Likewise.
254 * nto-tdep.h (private_thread_info): Rename to ...
255 (nto_thread_info): ... this, initialize fields.
256 (get_nto_thread_info): New.
257 <name>: Change type to std::string.
258 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
260 * nto-procfs.c (update_thread_private_data_name): Adjust to
261 std::string change, allocate nto_private_thread_info with new.
262 (update_thread_private_data): Adjust to unique_ptr.
263 * remote.c (private_thread_info): Rename to ...
264 (remote_thread_info): ... this, initialize data members with
266 <extra, name>: Change type to std::string.
267 <thread_handle>: Change type to non-pointer.
268 (free_private_thread_info): Remove.
269 (get_private_info_thread): Rename to...
270 (get_remote_thread_info): ... this, change return type, adjust to
271 use of unique_ptr, use remote_thread_info constructor.
272 (remote_add_thread): Adjust.
273 (get_private_info_ptid): Rename to...
274 (get_remote_thread_info): ...this, change return type.
275 (remote_thread_name): Use get_remote_thread_info, adjust to
276 change to std::string.
277 (struct thread_item) <~thread_item>: Remove.
278 <thread_handle>: Make non pointer.
279 (start_thread): Adjust to thread_item::thread_handle type
281 (remote_update_thread_list): Adjust to type name change, move
282 strings from temporary to long-lived object instead of
284 (remote_threads_extra_info): Use get_remote_thread_info.
285 (process_initial_stop_replies): Likewise.
286 (resume_clear_thread_private_info): Likewise.
287 (remote_resume): Adjust to type name change.
288 (remote_commit_resume): Use get_remote_thread_info.
289 (process_stop_reply): Adjust to type name change.
290 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
291 (remote_stopped_by_hw_breakpoint): Likewise.
292 (remote_stopped_by_watchpoint): Likewise.
293 (remote_stopped_data_address): Likewise.
294 (remote_core_of_thread): Likewise.
295 (remote_thread_handle_to_thread_info): Use
296 get_private_info_thread, adjust to thread_handle field type
299 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
301 * remote.c (struct thread_item): Add constructor, disable copy
302 construction and copy assignment, define default move
303 construction and move assignment.
304 <extra, name>: Change type to std::string.
306 <thread_handle>: Make non-pointer.
307 (thread_item_t): Remove typedef.
308 (DEF_VEC_O(thread_item_t)): Remove.
309 (threads_listing_context) <contains_thread>: New method.
310 <remove_thread>: New method.
311 <items>: Change type to std::vector.
312 (clear_threads_listing_context): Remove.
313 (threads_listing_context_remove): Remove.
314 (remote_newthread_step): Use thread_item constructor, adjust to
315 change to std::vector.
316 (start_thread): Use thread_item constructor, adjust to change to
318 (end_thread): Adjust to change to std::vector and std::string.
319 (remote_get_threads_with_qthreadinfo): Use thread_item
320 constructor, adjust to std::vector.
321 (remote_update_thread_list): Adjust to change to std::vector and
322 std::string, use threads_listing_context methods.
323 (remove_child_of_pending_fork): Adjust.
324 (remove_new_fork_children): Adjust.
325 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
326 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
327 * unittests/rsp-low-selftests.c: New file.
328 * common/rsp-low.h: Include common/byte-vector.h.
329 (hex2bin): New overload.
330 * common/rsp-low.c (hex2bin): New overload.
332 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
334 * inferior.h (private_inferior): Define structure type, add
335 virtual pure destructor.
336 (inferior) <priv>: Change type to unique_ptr.
337 * inferior.c (private_inferior::~private_inferior): Provide
338 default implementation.
339 (inferior::~inferior): Don't free priv field.
340 (exit_inferior_1): Likewise.
341 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
342 (darwin_exception_info): Remove typedef.
343 (DEF_VEC_O (darwin_thread_t)); Remove.
344 (private_inferior): Rename to ...
345 (darwin_private_inferior): ... this, extend private_inferior.
346 (get_darwin_inferior): New.
347 <threads>: Change type to std::vector of darwin_thread_t pointers.
348 * darwin-nat.c (darwin_check_new_threads): Adjust.
349 (find_inferior_task_it): Adjust.
350 (darwin_find_thread); Adjust.
351 (darwin_suspend_inferior): Adjust.
352 (darwin_resume_inferior): Adjust.
353 (darwin_find_new_inferior): Adjust.
354 (darwin_decode_notify_message): Adjust.
355 (darwin_send_reply): Adjust.
356 (darwin_resume_inferior_threads): Adjust.
357 (darwin_suspend_inferior_threads): Adjust.
358 (darwin_decode_message): Adjust.
359 (darwin_wait): Adjust.
360 (darwin_interrupt): Adjust.
361 (darwin_deallocate_threads): Adjust.
362 (darwin_mourn_inferior): Adjust, don't free private data.
363 (darwin_reply_to_all_pending_messages): Adjust.
364 (darwin_stop_inferior): Adjust.
365 (darwin_setup_exceptions): Adjust.
366 (darwin_kill_inferior): Adjust.
367 (darwin_setup_request_notification): Adjust.
368 (darwin_attach_pid): Adjust.
369 (darwin_init_thread_list): Adjust.
370 (darwin_setup_fake_stop_event): Adjust.
371 (darwin_attach): Adjust.
372 (darwin_detach): Adjust.
373 (darwin_xfer_partial): Adjust.
374 (set_enable_mach_exceptions): Adjust.
375 (darwin_pid_to_exec_file): Adjust.
376 (darwin_get_ada_task_ptid): Adjust.
377 * darwin-nat-info.c (get_task_from_args): Adjust.
378 (info_mach_ports_command): Adjust.
379 (info_mach_region_command): Adjust.
380 (info_mach_exceptions_command): Adjust.
381 * remote.c (private_inferior): Rename to ...
382 (remote_private_inferior): ... this, initialize fields.
383 (get_remote_inferior); New.
384 (remote_commit_resume): Use get_remote_inferior.
385 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
387 2017-11-24 Pedro Alves <palves@redhat.com>
389 * NEWS: Mention linespecs and explicit locations, and completion
392 2017-11-24 Yao Qi <yao.qi@linaro.org>
394 * regcache.c (regcache::dump): Remove footnote_register_size.
396 2017-11-24 Yao Qi <yao.qi@linaro.org>
398 * regcache.c (cooked_read_test): Add more test for readonly
401 2017-11-24 Yao Qi <yao.qi@linaro.org>
403 * gdbarch-selftests.c (test_target_has_registers): Move it to
405 (test_target_has_stack): Likewise.
406 (test_target_has_memory): Likewise.
407 (test_target_prepare_to_store): Likewise.
408 (test_target_store_registers): Likewise.
409 (test_target_ops): Likewise.
410 * regcache.c: Include selftest-arch.h and gdbthread.h.
411 (target_ops_no_register): New class.
412 (test_target_fetch_registers): New.
413 (test_target_store_registers): New.
414 (test_target_xfer_partial): New.
415 (readwrite_regcache): New.
416 (cooked_read_test): New.
417 (_initialize_regcache): Register the test.
418 * target.c: (test_target_has_registers): Moved from
420 (test_target_has_stack): Likewise.
421 (test_target_has_memory): Likewise.
422 (test_target_prepare_to_store): Likewise.
423 (test_target_store_registers): Likewise.
424 * target.h (test_target_ops): New class.
426 2017-11-24 Alan Hayward <alan.hayward@arm.com>
428 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
431 2017-11-24 Alan Hayward <alan.hayward@arm.com>
433 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
434 * arch/aarch64.c (aarch64_create_target_description): Create
435 new target description.
436 * features/Makefile: Add new files.
437 * features/aarch64.c: Remove file.
438 * features/aarch64-core.c: New autogenerated file.
439 * features/aarch64-fpu.c: New autogenerated file.
440 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
442 2017-11-24 Alan Hayward <alan.hayward@arm.com>
444 * Makefile.in: Add new files.
445 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
446 aarch64_read_description.
447 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
448 Call aarch64_read_description.
449 * aarch64-tdep.c (aarch64_read_description): New function.
450 (aarch64_gdbarch_init): Call aarch64_read_description.
451 * aarch64-tdep.h (aarch64_read_description): New function.
452 * arch/aarch64.c: New file.
453 * configure.tgt: Add new files.
455 2017-11-24 Yao Qi <yao.qi@linaro.org>
457 * mi/mi-main.c (register_changed_p): Update.
458 * value.c (value_contents_bits_eq): Change return type.
459 (value_contents_eq): Likewise.
460 * value.h: Update comments.
462 2017-11-24 Yao Qi <yao.qi@linaro.org>
464 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
465 local 'changed'. Remove error.
466 (register_changed_p): Change return type to bool.
468 2017-11-24 Yao Qi <yao.qi@linaro.org>
470 * arch/tic6x.c: New file.
471 * arch/tic6x.h: New file.
472 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
473 tic6x-core.xml and tic6x-gp.xml.
474 * features/tic6x-c6xp.c: Generated.
475 * features/tic6x-core.c: Generated.
476 * features/tic6x-gp.c: Generated.
477 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
480 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
482 * mi/mi-main.c (list_available_thread_groups): Change map value
485 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
487 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
489 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
491 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
493 <children_requested>: ... this.
494 (varobj_get_num_children, varobj_update): Adjust.
496 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
498 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
499 (ada_value_has_mutated): Likewise.
500 * c-varobj.c (varobj_is_anonymous_child): Likewise.
501 (c_is_path_expr_parent): Likewise.
502 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
503 (mi_cmd_var_set_frozen): Likewise.
504 (mi_cmd_var_update_iter): Likewise.
505 (mi_cmd_var_update): Likewise.
506 * varobj.c (pretty_printing): Likewise.
507 (varobj_enable_pretty_printing): Likewise.
508 (struct varobj_root) <floating, is_valid>: Likewise.
509 (struct varobj_dynamic) <children_requested>: Likewise.
510 (delete_variable): Likewise.
511 (delete_variable_1): Likewise.
512 (install_variable): Likewise.
513 (update_type_if_necessary): Likewise.
514 (install_new_value): Likewise.
515 (value_of_root): Likewise.
516 (is_root_p): Likewise.
517 (varobj_create): Likewise.
518 (varobj_delete): Likewise.
519 (varobj_has_more): Likewise.
520 (varobj_set_frozen): Likewise.
521 (varobj_get_frozen): Likewise.
522 (install_dynamic_child): Likewise.
523 (dynamic_varobj_has_child_method): Likewise.
524 (update_dynamic_varobj_children): Likewise.
525 (varobj_get_num_children): Likewise.
526 (varobj_list_children): Likewise.
527 (is_path_expr_parent): Likewise.
528 (varobj_default_is_path_expr_parent): Likewise.
529 (varobj_is_dynamic_p): Likewise.
530 (varobj_set_value): Likewise.
531 (varobj_value_has_mutated): Likewise.
532 (varobj_update): Likewise.
533 (check_scope): Likewise.
534 (value_of_root_1): Likewise.
535 (varobj_value_get_print_value): Likewise.
536 (varobj_editable_p): Likewise.
537 (varobj_value_is_changeable_p): Likewise.
538 (varobj_floating_p): Likewise.
539 (varobj_default_value_is_changeable_p): Likewise.
540 (varobj_invalidate_iter): Likewise.
541 * varobj.h (struct varobj_update_result) <type_changed,
542 children_changed, changed, value_installed>: Likewise.
543 (struct varobj) <updated, frozen, not_fetched>: Likewise.
544 (struct lang_varobj_ops) <value_is_changeable_p,
545 value_has_mutated, is_path_expr_parent>: Likewise.
546 (varobj_delete): Likewise.
547 (varobj_set_frozen): Likewise.
548 (varobj_get_frozen): Likewise.
549 (varobj_set_value): Likewise.
550 (varobj_update): Likewise.
551 (varobj_editable_p): Likewise.
552 (varobj_floating_p): Likewise.
553 (varobj_has_more): Likewise.
554 (varobj_is_dynamic_p): Likewise.
555 (varobj_default_value_is_changeable_p): Likewise.
556 (varobj_value_is_changeable_p): Likewise.
557 (varobj_is_anonymous_child): Likewise.
558 (varobj_default_is_path_expr_parent): Likewise.
560 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
562 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
563 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
564 <type_str>: Convert to 'std::string'.
565 <expr>: Convert to 'expression_up'.
566 (dtrace_probe_arg_s): Delete type and VEC.
567 (dtrace_probe_enabler_s): Likewise.
568 (struct dtrace_probe): Replace by...
569 (class dtrace_static_probe_ops): ...this and...
570 (class dtrace_probe): ...this.
571 (dtrace_probe_is_linespec): Rename to...
572 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
574 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
575 Adjust code. Create new instance of 'dtrace_probe'.
576 (dtrace_build_arg_exprs): Rename to...
577 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
579 (dtrace_get_probes): Rename to...
580 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
582 (dtrace_get_arg): Rename to...
583 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
585 (dtrace_probe_is_enabled): Rename to...
586 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
588 (dtrace_get_probe_address): Rename to...
589 (dtrace_probe::get_relocated_address): ...this. Adjust code
591 (dtrace_get_probe_argument_count): Rename to...
592 (dtrace_probe::get_argument_count): ...this. Adjust code to
594 (dtrace_can_evaluate_probe_arguments): Rename to...
595 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
597 (dtrace_evaluate_probe_argument): Rename to...
598 (dtrace_probe::evaluate_argument): ...this. Adjust code to
600 (dtrace_compile_to_ax): Rename to...
601 (dtrace_probe::compile_to_ax): ...this. Adjust code to
603 (dtrace_probe_destroy): Delete.
604 (dtrace_type_name): Rename to...
605 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
607 (dtrace_probe::get_static_ops): New method.
608 (dtrace_gen_info_probes_table_header): Rename to...
609 (dtrace_static_probe_ops::gen_info_probes_table_header):
610 ...this. Adjust code to reflect change.
611 (dtrace_gen_info_probes_table_values): Rename to...
612 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
613 code to reflect change.
614 (dtrace_enable_probe): Rename to...
615 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
617 (dtrace_disable_probe): Rename to...
618 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
620 (struct probe_ops dtrace_probe_ops): Delete.
621 (info_probes_dtrace_command): Call 'info_probes_for_spops'
622 instead of 'info_probes_for_ops'.
623 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
626 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
627 Simon Marchi <simark@simark.ca>
629 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
631 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
632 <aexpr>: Change type to 'expression_up'.
633 (stap_probe_arg_s): Delete type and VEC.
634 (struct stap_probe): Delete. Replace by...
635 (class stap_static_probe_ops): ...this and...
636 (class stap_probe): ...this. Rename variables to add 'm_'
637 prefix. Do not use 'union' for arguments anymore.
638 (stap_get_expected_argument_type): Receive probe name instead
639 of 'struct stap_probe'. Adjust code.
640 (stap_parse_probe_arguments): Rename to...
641 (stap_probe::parse_arguments): ...this. Adjust code to
643 (stap_get_probe_address): Rename to...
644 (stap_probe::get_relocated_address): ...this. Adjust code
646 (stap_get_probe_argument_count): Rename to...
647 (stap_probe::get_argument_count): ...this. Adjust code
649 (stap_get_arg): Rename to...
650 (stap_probe::get_arg_by_number'): ...this. Adjust code to
652 (can_evaluate_probe_arguments): Rename to...
653 (stap_probe::can_evaluate_arguments): ...this. Adjust code
655 (stap_evaluate_probe_argument): Rename to...
656 (stap_probe::evaluate_argument): ...this. Adjust code
658 (stap_compile_to_ax): Rename to...
659 (stap_probe::compile_to_ax): ...this. Adjust code to
661 (stap_probe_destroy): Delete.
662 (stap_modify_semaphore): Adjust comment.
663 (stap_set_semaphore): Rename to...
664 (stap_probe::set_semaphore): ...this. Adjust code to reflect
666 (stap_clear_semaphore): Rename to...
667 (stap_probe::clear_semaphore): ...this. Adjust code to
669 (stap_probe::get_static_ops): New method.
670 (handle_stap_probe): Adjust code to create instance of
672 (stap_get_probes): Rename to...
673 (stap_static_probe_ops::get_probes): ...this. Adjust code to
675 (stap_probe_is_linespec): Rename to...
676 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
678 (stap_type_name): Rename to...
679 (stap_static_probe_ops::type_name): ...this. Adjust code to
681 (stap_gen_info_probes_table_header): Rename to...
682 (stap_static_probe_ops::gen_info_probes_table_header):
683 ...this. Adjust code to reflect change.
684 (stap_gen_info_probes_table_values): Rename to...
685 (stap_probe::gen_info_probes_table_values): ...this. Adjust
686 code to reflect change.
687 (struct probe_ops stap_probe_ops): Delete.
688 (info_probes_stap_command): Use 'info_probes_for_spops'
689 instead of 'info_probes_for_ops'.
690 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
693 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
695 * break-catch-throw.c (fetch_probe_arguments): Use
696 'probe.prob' instead of 'probe.probe'.
697 * breakpoint.c (create_longjmp_master_breakpoint): Call
698 'can_evaluate_arguments' and 'get_relocated_address' methods
700 (create_exception_master_breakpoint): Likewise.
701 (add_location_to_breakpoint): Use 'sal->prob' instead of
703 (bkpt_probe_insert_location): Call 'set_semaphore' method from
705 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
706 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
708 (probe_key_free): Call 'delete' on probe.
709 (check_exception_resume): Use 'probe.prob' instead of
711 * location.c (string_to_event_location_basic): Call
712 'probe_linespec_to_static_ops'.
713 * probe.c (class any_static_probe_ops): New class.
714 (any_static_probe_ops any_static_probe_ops): New variable.
715 (parse_probes_in_pspace): Receive 'static_probe_ops' as
716 argument. Adjust code to reflect change.
717 (parse_probes): Use 'static_probe_ops' instead of
718 'probe_ops'. Adjust code to reflect change.
719 (find_probes_in_objfile): Call methods to get name and
721 (find_probe_by_pc): Use 'result.prob' instead of
722 'result.probe'. Call 'get_relocated_address' method from
724 (collect_probes): Adjust comment and argument list to receive
725 'static_probe_ops' instead of 'probe_ops'. Adjust code to
726 reflect change. Call necessary methods from probe.
727 (compare_probes): Call methods to get name and provider from
729 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
730 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
731 adjust code accordingly.
732 (print_ui_out_not_applicables): Likewise.
733 (info_probes_for_ops): Rename to...
734 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
735 as argument instead of 'probe_ops'. Adjust code. Call
736 necessary methods from probe.
737 (info_probes_command): Use 'info_probes_for_spops'.
738 (enable_probes_command): Pass correct argument to
739 'collect_probes'. Call methods from probe.
740 (disable_probes_command): Likewise.
741 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
742 (get_probe_argument_count): Move to
743 'any_static_probe_ops::get_argument_count'.
744 (can_evaluate_probe_arguments): Move to
745 'any_static_probe_ops::can_evaluate_arguments'.
746 (evaluate_probe_argument): Move to
747 'any_static_probe_ops::evaluate_argument'.
748 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
750 (probe_linespec_to_ops): Rename to...
751 (probe_linespec_to_static_ops): ...this. Adjust code.
752 (probe_any_is_linespec): Rename to...
753 (any_static_probe_ops::is_linespec): ...this.
754 (probe_any_get_probes): Rename to...
755 (any_static_probe_ops::get_probes): ...this.
756 (any_static_probe_ops::type_name): New method.
757 (any_static_probe_ops::gen_info_probes_table_header): New
759 (compute_probe_arg): Use 'pc_probe.prob' instead of
760 'pc_probe.probe'. Call methods from probe.
761 (compile_probe_arg): Likewise.
762 (std::vector<const probe_ops *> all_probe_ops): Delete.
763 (std::vector<const static_probe_ops *> all_static_probe_ops):
765 (_initialize_probe): Use 'all_static_probe_ops' instead of
767 * probe.h (struct info_probe_column) <field_name>: Delete
769 (info_probe_column_s): Delete type and VEC.
770 (struct probe_ops): Delete. Replace with...
771 (class static_probe_ops): ...this and...
772 (clas probe): ...this.
773 (struct bound_probe) <bound_probe>: Delete extraneous
774 newline. Adjust constructor to receive 'probe' instead of
776 <probe>: Rename to...
777 <prob>: ...this. Delete extraneous newline.
778 <objfile>: Delete extraneous newline.
779 (register_probe_ops): Delete unused prototype.
780 (info_probes_for_ops): Rename to...
781 (info_probes_for_spops): ...this. Adjust comment.
782 (get_probe_address): Move to 'probe::get_address'.
783 (get_probe_argument_count): Move to
784 'probe::get_argument_count'.
785 (can_evaluate_probe_arguments): Move to
786 'probe::can_evaluate_arguments'.
787 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
788 * solib-svr4.c (struct svr4_info): Adjust comment.
789 (struct probe_and_action) <probe>: Rename to...
791 (register_solib_event_probe): Receive 'probe' instead of
792 'struct probe' as argument. Use 'prob' instead of 'probe'
794 (solib_event_probe_action): Call 'get_argument_count' method
795 from probe. Adjust comment.
796 (svr4_handle_solib_event): Adjust comment. Call
797 'evaluate_argument' method from probe.
798 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
800 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
801 'struct probe'. Call 'can_evaluate_arguments' from probe.
802 * symfile.h: Forward declare 'class probe' instead of 'struct
804 * symtab.h: Likewise.
805 (struct symtab_and_line) <probe>: Rename to...
807 * tracepoint.c (start_tracing): Use 'prob' when applicable.
809 (stop_tracing): Likewise.
811 2017-11-22 Joel Brobecker <brobecker@adacore.com>
813 * ravenscar-thread.c (ravenscar_inferior_created): Remove
814 trailing newline at end of string in call to warning.
816 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
818 * osdata.h: Include vector isntead of vec.h.
819 (osdata_column_s): Remove typedef.
820 (struct osdata_column): Add constructor.
821 <name, value>: Change type to std::string.
822 (DEF_VEC_O (osdata_column_s)): Remove.
823 (osdata_item_s): Remove typedef.
824 (struct osdata_item) <columns>: Change type to std::vector.
825 (DEF_VEC_O (osdata_item_s)): Remove.
826 (struct osdata): Add constructor.
827 <type>: Change type to std::string.
828 <items>: Change type to std::vector.
829 (osdata_p): Remove typedef.
830 (DEF_VEC_P (osdata_p)): Remove.
831 (osdata_parse): Return a unique_ptr.
832 (osdata_free): Remove.
833 (make_cleanup_osdata_free): Remove.
834 (get_osdata): Return a unique_ptr.
835 (get_osdata_column): Return pointer to std::string, take a
836 reference to osdata_item as parameter.
837 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
839 <property_name>: Change type to std::string.
840 (osdata_start_osdata): Allocate osdata with new and adjust.
841 (osdata_start_item): Adjust.
842 (osdata_start_column): Adjust.
843 (osdata_end_column): Adjust.
844 (clear_parsing_data): Remove.
845 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
846 (osdata_item_clear): Remove.
847 (get_osdata): return a unique_ptr and adjust.
848 (get_osdata_column): Return a pointer to std::string and adjust.
849 (info_osdata): Adjust.
850 * mi/mi-main.c: Include <map>.
851 (free_vector_of_osdata_items): Remove.
852 (list_available_thread_groups): Adjust, use std::map instead of
855 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
857 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
860 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
862 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
864 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
866 * varobj.h (struct varobj_update_result): Add constructor, add
867 move constructor, disable copy and assign, initialize fields.
868 <newobj>: Change type to std::vector.
869 (varobj_update): Return std::vector.
870 * varobj.c (install_dynamic_child): Change VEC parameters to
871 std::vector and adjust.
872 (update_dynamic_varobj_children): Likewise.
873 (varobj_update): Return std::vector and adjust.
874 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
876 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
878 * varobj.h (struct varobj) <parent>: Remove const.
879 <children>: Change type to std::vector.
880 (varobj_list_children): Return std::vector const reference.
881 (varobj_restrict_range): Change parameter type to std::vector
883 * varobj.c (varobj_has_more): Adjust.
884 (varobj_restrict_range): Change parameter type to std::vector
885 const reference and adjust.
886 (install_dynamic_child): Adjust.
887 (update_dynamic_varobj_children): Adjust.
888 (varobj_list_children): Return std::vector const reference and
890 (varobj_add_child): Adjust.
891 (update_type_if_necessary): Adjust.
892 (varobj_update): Adjust.
893 (delete_variable_1): Adjust.
894 * ada-varobj.c (ada_value_has_mutated): Adjust.
895 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
897 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
899 * varobj.h (struct varobj): Add constructor and destructor,
901 * varobj.c (struct varobj_root): Initialize fields.
902 (struct varobj_dynamic): Initialize fields.
903 (varobj_create): Use unique_ptr instead of cleanup. Create
904 varobj with new instead of new_root_variable.
905 (delete_variable_1): Free variable with delete instead of
907 (create_child_with_value): Create variable with new instead of
909 (varobj::varobj): New.
910 (varobj::~varobj): New (body mostly coming from free_variable).
911 (new_variable): Remove.
912 (free_variable): Remove.
913 (do_free_variable_cleanup): Remove.
914 (make_cleanup_free_variable): Remove.
916 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
918 * core-regset.c: Remove file.
919 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
921 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
923 * NEWS: Document use of GNU MPFR.
926 * Makefile.in (LIBMPFR): Add define.
927 (CLIBS): Add $(LIBMPFR).
928 * configure.ac: Add --with-mpfr configure option.
929 * configure: Regenerate.
930 * config.in: Regenerate.
932 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
933 (class mpfr_float_ops): New type.
934 (mpfr_float_ops::from_target): Two new overloaded functions.
935 (mpfr_float_ops::to_target): Likewise.
936 (mpfr_float_ops::to_string): New function.
937 (mpfr_float_ops::from_string): Likewise.
938 (mpfr_float_ops::to_longest): Likewise.
939 (mpfr_float_ops::from_longest): Likewise.
940 (mpfr_float_ops::from_ulongest): Likewise.
941 (mpfr_float_ops::to_host_double): Likewise.
942 (mpfr_float_ops::from_host_double): Likewise.
943 (mpfr_float_ops::convert): Likewise.
944 (mpfr_float_ops::binop): Likewise.
945 (mpfr_float_ops::compare): Likewise.
946 (get_target_float_ops): Use mpfr_float_ops if available.
948 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
950 * target-float.c: Do not include <math.h>.
951 Include <cmath> and <limits>.
952 (DOUBLEST): Do not define.
953 (class target_float_ops): New type.
954 (class host_float_ops): New templated type.
955 (class decimal_float_ops): New type.
957 (floatformat_to_doublest): Rename to ...
958 (host_float_ops<T>::from_target): ... this. Use template type T
959 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
960 (host_float_ops<T>::from_target): New overload using a type argument.
961 (floatformat_from_doublest): Rename to ...
962 (host_float_ops<T>::to_target): ... this. Use template type T
963 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
964 (host_float_ops<T>::to_target): New overload using a type argument.
965 (floatformat_printf_format): New function.
966 (struct printf_length_modifier): New templated type.
967 (floatformat_to_string): Rename to ...
968 (host_float_ops<T>::to_string): ... this. Use type instead of
969 floatformat argument. Use floatformat_printf_format and
970 printf_length_modifier. Remove special handling of invalid numbers,
971 infinities and NaN (moved to target_float_to_string).
972 (struct scanf_length_modifier): New templated type.
973 (floatformat_from_string): Rename to ...
974 (host_float_ops<T>::from_string): ... this. Use type instead of
975 floatformat argument. Use scanf_length_modifier.
976 (floatformat_to_longest): Rename to ...
977 (host_float_ops<T>::to_longest): ... this. Use type instead of
978 floatformat argument. Handle out-of-range values deterministically.
979 (floatformat_from_longest): Rename to ...
980 (host_float_ops<T>::from_longest): ... this. Use type instead of
981 floatformat argument.
982 (floatformat_from_ulongest): Rename to ...
983 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
984 floatformat argument.
985 (floatformat_to_host_double): Rename to ...
986 (host_float_ops<T>::to_host_double): ... this. Use type instead of
987 floatformat argument.
988 (floatformat_from_host_double): Rename to ...
989 (host_float_ops<T>::from_host_double): ... this. Use type instead of
990 floatformat argument.
991 (floatformat_convert): Rename to ...
992 (host_float_ops<T>::convert): ... this. Use type instead of
993 floatformat arguments. Remove handling of no-op conversions.
994 (floatformat_binop): Rename to ...
995 (host_float_ops<T>::binop): ... this. Use type instead of
996 floatformat arguments.
997 (floatformat_compare): Rename to ...
998 (host_float_ops<T>::compare): ... this. Use type instead of
999 floatformat arguments.
1001 (match_endianness): Use type instead of length/byte_order arguments.
1002 (set_decnumber_context): Likewise.
1003 (decimal_from_number): Likewise. Update calls.
1004 (decimal_to_number): Likewise.
1005 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1006 (decimal_float_ops::to_host_double): New dummy function.
1007 (decimal_float_ops::from_host_double): Likewise.
1008 (decimal_to_string): Rename to ...
1009 (decimal_float_ops::to_string): ... this. Use type instead of
1010 length/byte_order arguments. Update calls.
1011 (decimal_from_string): Rename to ...
1012 (decimal_float_ops::from_string): ... this. Use type instead of
1013 length/byte_order arguments. Update calls.
1014 (decimal_from_longest): Rename to ...
1015 (decimal_float_ops::from_longest): ... this. Use type instead of
1016 length/byte_order arguments. Update calls.
1017 (decimal_from_ulongest): Rename to ...
1018 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1019 length/byte_order arguments. Update calls.
1020 (decimal_to_longest): Rename to ...
1021 (decimal_float_ops::to_longest): ... this. Use type instead of
1022 length/byte_order arguments. Update calls.
1023 (decimal_binop): Rename to ...
1024 (decimal_float_ops::binop): ... this. Use type instead of
1025 length/byte_order arguments. Update calls.
1026 (decimal_compare): Rename to ...
1027 (decimal_float_ops::compare): ... this. Use type instead of
1028 length/byte_order arguments. Update calls.
1029 (decimal_convert): Rename to ...
1030 (decimal_float_ops::convert): ... this. Use type instead of
1031 length/byte_order arguments. Update calls.
1033 (target_float_same_category_p): New function.
1034 (target_float_same_format_p): Likewise.
1035 (target_float_format_length): Likewise.
1036 (enum target_float_ops_kind): New type.
1037 (get_target_float_ops_kind): New function.
1038 (get_target_float_ops): Three new overloaded functions.
1040 (target_float_is_zero): Update call.
1041 (target_float_to_string): Add special handling of invalid numbers,
1042 infinities and NaN (moved from floatformat_to_string). Use
1043 target_float_ops callback.
1044 (target_float_from_string): Use target_float_ops callback.
1045 (target_float_to_longest): Likewise.
1046 (target_float_from_longest): Likewise.
1047 (target_float_from_ulongest): Likewise.
1048 (target_float_to_host_double): Likewise.
1049 (target_float_from_host_double): Likewise.
1050 (target_float_convert): Add special case for no-op conversions.
1051 Use target_float_ops callback.
1052 (target_float_binop): Use target_float_ops callback.
1053 (target_float_compare): Likewise.
1055 2017-11-22 Yao Qi <yao.qi@linaro.org>
1057 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1059 2017-11-22 Yao Qi <yao.qi@linaro.org>
1061 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1062 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1064 2017-11-21 Jerome Guitton <guitton@adacore.com>
1066 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1067 with event ptid from the lower layer before doing the
1068 ravenscar-specific update.
1070 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1072 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1073 the ptid's TID is nonzero.
1075 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1077 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1078 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1079 Make non-static. Change return type to char *. Adjust code
1080 accordingly. Rewrite the function's documentation.
1081 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1082 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1083 we have enough debugging information in the runtime to support
1084 Ada task debugging before we enable the ravenscar-thread layer.
1086 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1088 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1089 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1090 * ravenscar-thread.c: Add into comment.
1091 (base_magic_null_ptid): Delete.
1092 (base_ptid): Change documentation.
1093 (ravenscar_active_task): Renames ravenscar_running_thread.
1094 All callers updated throughout.
1095 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1096 (ravenscar_task_is_currently_active): Likewise.
1097 (get_base_thread_from_ravenscar_task): Ditto.
1098 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1099 (ravenscar_runtime_initialized): Likewise.
1100 (get_running_thread_id): Add new parameter "cpu". Adjust
1101 implementation to handle this new parameter.
1102 (ravenscar_fetch_registers): Small adjustment to use
1103 is_ravenscar_task and ravenscar_task_is_currently_active in
1104 order to decide whether to use the target beneath or this
1106 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1107 (ravenscar_stopped_by_sw_breakpoint): Use
1108 get_base_thread_from_ravenscar_task to get the underlying
1109 thread, rather than using base_ptid.
1110 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1111 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1113 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1115 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1117 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1118 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1119 (get_tcb_types_info): Set fieldnos.base_cpu.
1120 (read_atcb): Set task_info->base_cpu.
1121 (info_task): Print "Base CPU" info if set by runtime.
1123 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1125 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1126 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1127 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1129 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1130 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1131 to_stopped_data_address and to_core_of_thread fields of
1134 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1136 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1137 (struct gdbarch_tdep): New member long_double_abi.
1138 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1139 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1140 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1141 format depending on long_double_abi tdep member.
1142 (ppc_floatformat_for_type): Handle __ibm128 type.
1144 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1146 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1148 2017-11-21 Pedro Alves <palves@redhat.com>
1150 * dwarf2read.c (mapped_index::find_name_components_bounds)
1151 <completion mode, upper bound>: Use std::lower_bound instead of
1153 (test_mapped_index_find_name_component_bounds): Remove incorrect
1154 "t1_fund" from expected symbols.
1156 2017-11-21 Pedro Alves <palves@redhat.com>
1158 * dwarf2read.c (mapped_index::name_components_casing): New field.
1159 (mapped_index) <build_name_components,
1160 find_name_components_bounds): Declare new methods.
1161 (mapped_index::find_name_components_bounds)
1162 (mapped_index::build_name_components): New methods, factored out
1163 from dw2_expand_symtabs_matching_symbol.
1164 (check_find_bounds_finds)
1165 (test_mapped_index_find_name_component_bounds): New.
1166 (run_test): Rename to ...
1167 (test_dw2_expand_symtabs_matching_symbol): ... this.
1168 (run_test): Reimplement.
1170 2017-11-21 Pedro Alves <palves@redhat.com>
1172 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1173 (symbol_end): Use cp_ident_is_alnum.
1174 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1175 * dwarf2read.c (make_sort_after_prefix_name): New function.
1176 (dw2_expand_symtabs_matching_symbol): Use it.
1177 (test_symbols): Add more symbols.
1178 (run_test): Add tests.
1180 2017-11-17 Tom Tromey <tom@tromey.com>
1182 * symtab.h (enum symbol_subclass_kind): New.
1183 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1185 <subclass>: New member.
1186 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1187 * rust-lang.c (rust_get_trait_object_pointer): Update.
1188 * dwarf2read.c (read_func_scope): Update.
1189 (read_variable): Update.
1191 2017-11-17 Tom Tromey <tom@tromey.com>
1193 * dwarf2read.c (read_func_scope): Update.
1194 * symtab.h (struct template_symbol): Derive from symbol.
1197 2017-11-17 Tom Tromey <tom@tromey.com>
1199 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1200 (struct rust_vtable_symbol): New.
1201 (find_symbol_at_address): Declare.
1202 * symtab.c (find_symbol_at_address): New function.
1203 * symfile.h (struct quick_symbol_functions)
1204 <find_compunit_symtab_by_address>: New member.
1205 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1207 (debug_sym_quick_functions): Link to
1208 debug_qf_find_compunit_symtab_by_address.
1209 * rust-lang.c (rust_get_trait_object_pointer): New function.
1210 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1211 rust_get_trait_object_pointer.
1212 * psymtab.c (psym_relocate): Clear psymbol_map.
1213 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1215 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1216 * objfiles.h (struct objfile) <psymbol_map>: New member.
1217 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1218 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1219 (rust_containing_type, read_variable): New functions.
1221 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1223 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1225 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1227 * common/filestuff.c: Include <algorithm>.
1228 (open_fds): Change type to std::vector<int>.
1229 (do_mark_open_fd): Adjust.
1230 (unmark_fd_no_cloexec): Adjust.
1233 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1235 * breakpoint.c (output_thread_groups): Take an std::vector.
1236 (print_one_breakpoint_location): Adjust.
1238 2017-11-17 Joel Brobecker <brobecker@adacore.com>
1240 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1241 (ada_evaluate_subexp_for_cast): New function.
1242 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1243 ada_evaluate_subexp_for_cast.
1244 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1246 * eval.c (evaluate_var_value): Make non-static.
1247 (evaluate_var_msym_value, eval_skip_value): Likewise.
1248 * value.h (evaluate_var_value, evaluate_var_msym_value)
1249 (eval_skip_value): Declare.
1251 2017-11-16 Joel Brobecker <brobecker@adacore.com>
1253 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1256 2017-11-16 Pedro Alves <palves@redhat.com>
1258 * python/py-unwind.c (pyuw_sniffer): Translate
1259 PyExc_KeyboardInterrupt to a GDB Quit exception.
1261 2017-11-16 Pedro Alves <palves@redhat.com>
1263 * infrun.c (resume_cleanups): Delete.
1264 (resume): No longer install a resume_cleanups cleanup nor call
1266 (proceed): Pass the terminal to the inferior.
1267 (keep_going_pass_signal): No longer install a resume_cleanups
1270 2017-11-16 Pedro Alves <palves@redhat.com>
1272 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1273 if the prompt is blocked.
1275 2017-11-16 Pedro Alves <palves@redhat.com>
1277 * breakpoint.c (insert_bp_location): Replace bp_err and
1278 bp_err_message locals by a gdb_exception local.
1280 2017-11-16 Pedro Alves <palves@redhat.com>
1282 * inflow.c (scoped_ignore_sigttou): New class.
1283 (child_terminal_ours_1, new_tty): Use it.
1285 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1287 * target-float.c (decimal_from_number): Add byte_order argument and
1288 call match_endianness. Error if unknown floating-point type.
1289 (decimal_to_number): Add byte_order argument and call match_endianness.
1290 (decimal_from_longest): Update call. Do not call match_endianness.
1291 (decimal_from_ulongest): Likewise.
1292 (decimal_binop): Likewise.
1293 (decimal_is_zero): Likewise.
1294 (decimal_compare): Likewise.
1295 (decimal_convert): Likewise.
1297 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1299 * python/python.c (gdbpy_rbreak): New function.
1300 * NEWS: Document Python rbreak feature.
1302 2017-11-16 Yao Qi <yao.qi@linaro.org>
1304 * features/tic6x-c62x.xml: Remove.
1305 * features/tic6x-c64x.xml: Remove.
1306 * features/tic6x-c64xp.xml: Remove.
1308 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1310 * symtab.h: Include <array>.
1312 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1314 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1315 (bsd_kvm_proc_cmd): Likewise.
1317 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1319 * tui/tui-win.c (window_name_completer): Replace VEC with
1322 2017-11-15 Andrew Cagney <cagney@gnu.org>
1324 * MAINTAINERS: Remove no-longer applicable entries.
1326 2017-11-15 Andrew Cagney <cagney@gnu.org>
1328 * MAINTAINERS: Move self to Past Maintainers.
1330 2017-11-15 Yao Qi <yao.qi@linaro.org>
1332 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1333 * features/nios2-linux.c: Remove.
1334 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1335 initialize_tdesc_nios2_linux.
1337 2017-11-15 Yao Qi <yao.qi@linaro.org>
1339 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1340 M68HC11_LAST_HARD_REG + 1.
1342 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1345 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1346 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1347 Return TARGET_XFER_EOF if size of returned data is 0.
1349 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1351 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1352 memory-map-selftests.c.
1353 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1354 * memory-map.c (memory_map_start_memory): Fix computation of hi
1356 * unittests/memory-map-selftests.c: New file.
1358 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1360 * ada-lang.c: Fix some typos in the general command documenting
1361 how Ada expressions are being evaluated and how their result
1364 2017-11-09 Tom Tromey <tom@tromey.com>
1366 * psymtab.c (psymbol_hash): Do not hash string contents.
1367 (psymbol_compare): Add comment.
1369 2017-11-09 Tom Tromey <tom@tromey.com>
1371 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1373 2017-11-08 Joel Brobecker <brobecker@adacore.com>
1375 * ada-exp.y (write_var_from_sym): Remove parameter
1376 "orig_left_context". Update all callers.
1378 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1380 * tracepoint.h (class collection_list) <stringify>: Return
1381 std::vector<std::string>.
1382 (encode_actions_rsp): Change parameters to
1383 std::vector<std::string> *.
1384 * tracepoint.c (collection_list::stringify): Return
1385 std::vector<std::string> and adjust accordingly.
1386 (encode_actions_rsp): Changee parameters to
1387 std::vector<std::string> and adjust accordingly.
1388 * remote.c (free_actions_list),
1389 free_actions_list_cleanup_wrapper): Remove.
1390 (remote_download_tracepoint): Adjust to std::vector.
1392 2017-11-08 Tom Tromey <tom@tromey.com>
1394 * dwarf2read.c (symbolp): Remove typedef.
1395 (read_func_scope): Use std::vector.
1396 (process_structure_scope): Use std::vector.
1398 2017-11-08 Pedro Alves <palves@redhat.com>
1400 * ada-lang.c (ada_make_symbol_completion_list): Use
1401 completion_skip_symbol.
1402 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
1403 (symbol_is_function_or_method(symbol*)): New.
1404 (add_symtab_completions): Add complete_symbol_mode parameter. Use
1405 completion_skip_symbol.
1406 (default_collect_symbol_completion_matches_break_on): Use
1407 completion_skip_symbol. Pass down mode.
1408 (collect_file_symbol_completion_matches): Pass down mode.
1409 * symtab.h (symbol_is_function_or_method): New declarations.
1410 (completion_skip_symbol): New template function.
1412 2017-11-08 Pedro Alves <palves@redhat.com>
1414 * linespec.c (iterate_over_all_matching_symtabs): Add
1415 search_domain parameter. Pass it down to expand_symtabs_matching.
1416 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
1417 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
1419 (add_all_symbol_names_from_pspace): Add search_domain parameter.
1421 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
1423 (add_matching_symbols_to_info): Add search_domain parameter. Pass
1426 2017-11-08 Pedro Alves <palves@redhat.com>
1428 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
1429 text_len locals and don't pass them down.
1430 * symtab.c (completion_list_add_name): Remove
1431 sym_text/sym_text_len parameters and adjust.
1432 (completion_list_add_symbol, completion_list_add_msymbol)
1433 (completion_list_objc_symbol, completion_list_add_fields)
1434 (add_symtab_completions): Likewise.
1435 (default_collect_symbol_completion_matches_break_on)
1436 (collect_file_symbol_completion_matches): Remove sym_text_len
1437 local and don't pass it down.
1438 * symtab.h (completion_list_add_name): Remove
1439 sym_text/sym_text_len parameters.
1441 2017-11-08 Pedro Alves <palves@redhat.com>
1443 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1444 unittests/lookup_name_info-selftests.c.
1445 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
1446 * cp-support.c: Include "selftest.h".
1447 (cp_remove_params_1): Rename from cp_remove_params. Add
1448 'require_param' parameter, and handle it.
1449 (cp_remove_params): Reimplement.
1450 (cp_remove_params_if_any): New.
1451 (selftests::quote): New.
1452 (selftests::check_remove_params): New.
1453 (selftests::test_cp_remove_params): New.
1454 (_initialize_cp_support): Install
1455 selftests::test_cp_remove_params.
1456 * cp-support.h (cp_remove_params_if_any): Declare.
1457 * dwarf2read.c :Include "selftest.h".
1458 (dw2_expand_symtabs_matching_symbol): Use
1459 lookup_name_info::make_ignore_params.
1460 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
1461 (selftests::dw2_expand_symtabs_matching::string_or_null)
1462 (selftests::dw2_expand_symtabs_matching::check_match)
1463 (selftests::dw2_expand_symtabs_matching::test_symbols)
1464 (selftests::dw2_expand_symtabs_matching::run_test): New.
1465 (_initialize_dwarf2_read): Register
1466 selftests::dw2_expand_symtabs_matching::run_test.
1467 * psymtab.c (psym_expand_symtabs_matching): Use
1468 lookup_name_info::make_ignore_params.
1469 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
1470 If the lookup name wants to ignore parameters, strip them.
1471 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
1473 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
1474 (default_collect_symbol_completion_matches_break_on): Don't try to
1476 * symtab.h (lookup_name_info::lookup_name_info): Add
1477 'ignore_parameters' parameter.
1478 (lookup_name_info::ignore_parameters)
1479 (lookup_name_info::make_ignore_params): New methods.
1480 (lookup_name_info::m_ignore_parameters): New field.
1481 * unittests/lookup_name_info-selftests.c: New file.
1483 2017-11-08 Pedro Alves <palves@redhat.com>
1485 * dwarf2read.c (dw2_expand_marked_cus)
1486 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
1487 (dw2_expand_symtabs_matching): Move further below.
1488 (dw2_expand_marked_cus): Reindent.
1490 2017-11-08 Pedro Alves <palves@redhat.com>
1492 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
1493 (struct name_component): New.
1494 (mapped_index::name_components): New field.
1495 (mapped_index::symbol_name_at): New method.
1496 (dwarf2_read_index): Call mapped_index ctor.
1497 (dw2_map_matching_symbols): Add comment about name_components
1499 (dw2_expand_symtabs_matching): Factor part to...
1500 (dw2_expand_symtabs_matching_symbol): ... this new function.
1501 Build name components table, and lookup symbols in it before
1502 calling the name matcher.
1503 (dw2_expand_marked_cus): New, factored out from
1504 dw2_expand_symtabs_matching.
1505 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
1507 2017-11-08 Pedro Alves <palves@redhat.com>
1509 * ada-lang.c (ada_encode): Rename to ..
1510 (ada_encode_1): ... this. Add throw_errors parameter and handle
1512 (ada_encode): Reimplement.
1513 (match_name): Delete, folded into full_name.
1514 (resolve_subexp): No longer pass the encoded name to
1515 ada_lookup_symbol_list.
1516 (should_use_wild_match): Delete.
1517 (name_match_type_from_name): New.
1518 (ada_lookup_simple_minsym): Use lookup_name_info and the
1519 language's symbol_name_matcher_ftype.
1520 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
1521 (ada_add_block_renamings): Adjust to use lookup_name_info.
1522 (ada_lookup_name): New.
1523 (add_nonlocal_symbols, ada_add_all_symbols)
1524 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
1525 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
1526 (ada_name_for_lookup): Delete.
1527 (ada_lookup_encoded_symbol): Construct a verbatim name.
1528 (wild_match): Reverse sense of return type. Use bool.
1529 (full_match): Reverse sense of return type. Inline bits of old
1531 (ada_add_block_symbols): Adjust to use lookup_name_info.
1532 (symbol_completion_match): Delete, folded into...
1533 (ada_lookup_name_info::matches): ... .this new method.
1534 (symbol_completion_add): Delete.
1535 (ada_collect_symbol_completion_matches): Add name_match_type
1536 parameter. Adjust to use lookup_name_info and
1537 completion_list_add_name.
1538 (get_var_value, ada_add_global_exceptions): Adjust to use
1540 (ada_get_symbol_name_cmp): Delete.
1541 (do_wild_match, do_full_match): New functions.
1542 (ada_lookup_name_info::ada_lookup_name_info): New method.
1543 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
1545 (ada_language_defn): Install ada_get_symbol_name_matcher.
1546 * ada-lex.l (processId): If name starts with '<', copy it
1548 * block.c (block_iter_match_step, block_iter_match_first)
1549 (block_iter_match_next, block_lookup_symbol)
1550 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
1552 * block.h (block_iter_match_first, block_iter_match_next)
1553 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
1554 * c-lang.c (c_language_defn, cplus_language_defn)
1555 (asm_language_defn, minimal_language_defn): Adjust comments to
1556 refer to la_get_symbol_name_matcher.
1557 * completer.c (complete_files_symbols)
1558 (collect_explicit_location_matches, symbol_completer): Pass a
1559 symbol_name_match_type down.
1560 * completer.h (class completion_match, completion_match_result):
1562 (completion_tracker::reset_completion_match_result): New method.
1563 (completion_tracker::m_completion_match_result): New field.
1564 * cp-support.c (make_symbol_overload_list_block): Adjust to use
1566 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
1568 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
1569 * d-lang.c: Adjust comments to refer to
1570 la_get_symbol_name_matcher.
1571 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
1572 Adjust to use lookup_name_info.
1573 (dict_iter_match_first, dict_iter_match_next)
1574 (iter_match_first_hashed, iter_match_next_hashed)
1575 (iter_match_first_linear, iter_match_next_linear): Adjust to work
1576 with a lookup_name_info.
1577 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
1579 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
1580 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
1581 (gdb_index_symbol_name_matcher): New class.
1582 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
1583 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
1584 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
1585 with a symbol_name_match_type.
1586 (f_language_defn): Adjust comments to refer to
1587 la_get_symbol_name_matcher.
1588 * go-lang.c (go_language_defn): Adjust comments to refer to
1589 la_get_symbol_name_matcher.
1590 * language.c (default_symbol_name_matcher)
1591 (language_get_symbol_name_matcher): New functions.
1592 (unknown_language_defn, auto_language_defn): Adjust comments to
1593 refer to la_get_symbol_name_matcher.
1594 * language.h (symbol_name_cmp_ftype): Delete.
1595 (language_defn) <la_collect_symbol_completion_matches>: Add match
1597 <la_get_symbol_name_cmp>: Delete field.
1598 <la_get_symbol_name_matcher>: New field.
1599 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
1600 (default_symbol_name_matcher, language_get_symbol_name_matcher):
1602 * linespec.c (iterate_over_all_matching_symtabs)
1603 (iterate_over_file_blocks): Adjust to use lookup_name_info.
1604 (find_methods): Add language parameter, and use lookup_name_info
1605 and the language's symbol_name_matcher_ftype.
1606 (linespec_complete_function): Adjust.
1607 (lookup_prefix_sym): Use lookup_name_info.
1608 (add_all_symbol_names_from_pspace): Adjust.
1609 (find_superclass_methods): Add language parameter and pass it
1611 (find_method): Pass symbol language down.
1612 (find_linespec_symbols): Don't demangle or Ada encode here.
1613 (search_minsyms_for_name): Add lookup_name_info parameter.
1614 (add_matching_symbols_to_info): Add name_match_type parameter.
1615 Use lookup_name_info.
1616 * m2-lang.c (m2_language_defn): Adjust comments to refer to
1617 la_get_symbol_name_matcher.
1618 * minsyms.c: Include <algorithm>.
1619 (add_minsym_to_demangled_hash_table): Remove table parameter and
1620 add objfile parameter. Use search_name_hash, and add language to
1621 demangled languages vector.
1622 (struct found_minimal_symbols): New struct.
1623 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
1625 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
1626 input names here. Use lookup_name_info instead. Lookup up
1627 demangled names once for each language in the demangled names
1629 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
1630 demangled names once for each language in the demangled names
1632 (build_minimal_symbol_hash_tables): Adjust.
1633 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
1635 * objc-lang.c (objc_language_defn): Adjust comment to refer to
1636 la_get_symbol_name_matcher.
1637 * objfiles.h: Include <vector>.
1638 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
1639 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
1640 la_get_symbol_name_matcher.
1641 * p-lang.c (pascal_language_defn): Adjust comment to refer to
1642 la_get_symbol_name_matcher.
1643 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
1644 (match_partial_symbol): Use symbol_name_match_type,
1645 lookup_name_info and psymbol_name_matches.
1646 (lookup_partial_symbol): Use lookup_name_info.
1647 (map_block): Use symbol_name_match_type and lookup_name_info.
1648 (psym_map_matching_symbols): Use symbol_name_match_type.
1649 (psymbol_name_matches): New.
1650 (recursively_search_psymtabs): Use lookup_name_info and
1651 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
1652 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
1653 'kind' parameter to 'domain'.
1654 * rust-lang.c (rust_language_defn): Adjust comment to refer to
1655 la_get_symbol_name_matcher.
1656 * symfile-debug.c (debug_qf_map_matching_symbols)
1657 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
1658 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
1659 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
1660 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
1661 Adjust to use symbol_name_match_type.
1662 <expand_symtabs_matching>: Adjust to use lookup_name_info.
1663 (expand_symtabs_matching): Adjust to use lookup_name_info.
1664 * symmisc.c (maintenance_expand_symtabs): Use
1665 lookup_name_info::match_any ().
1666 * symtab.c (symbol_matches_search_name): New.
1667 (eq_symbol_entry): Adjust to use lookup_name_info and the
1669 (demangle_for_lookup_info::demangle_for_lookup_info): New.
1670 (lookup_name_info::match_any): New.
1671 (iterate_over_symbols, search_symbols): Use lookup_name_info.
1672 (compare_symbol_name): Add language, lookup_name_info and
1673 completion_match_result parameters, and use them.
1674 (completion_list_add_name): Make extern. Add language and
1675 lookup_name_info parameters. Use them.
1676 (completion_list_add_symbol, completion_list_add_msymbol)
1677 (completion_list_objc_symbol): Add lookup_name_info parameters and
1678 adjust. Pass down language.
1679 (completion_list_add_fields): Add lookup_name_info parameters and
1680 adjust. Pass down language.
1681 (add_symtab_completions): Add lookup_name_info parameters and
1683 (default_collect_symbol_completion_matches_break_on): Add
1684 name_match_type parameter, and use it. Use lookup_name_info.
1685 (default_collect_symbol_completion_matches)
1686 (collect_symbol_completion_matches): Add name_match_type
1687 parameter, and pass it down.
1688 (collect_symbol_completion_matches_type): Adjust.
1689 (collect_file_symbol_completion_matches): Add name_match_type
1690 parameter, and use lookup_name_info.
1691 * symtab.h: Include <string> and "common/gdb_optional.h".
1692 (enum class symbol_name_match_type): New.
1693 (class ada_lookup_name_info): New.
1694 (struct demangle_for_lookup_info): New.
1695 (class lookup_name_info): New.
1696 (symbol_name_matcher_ftype): New.
1697 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
1698 (symbol_matches_search_name): Declare.
1699 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
1700 (default_collect_symbol_completion_matches)
1701 (collect_symbol_completion_matches)
1702 (collect_file_symbol_completion_matches): Add name_match_type
1704 (iterate_over_symbols): Use lookup_name_info.
1705 (completion_list_add_name): Declare.
1706 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
1707 (strncmp_iw_with_mode): Now extern.
1708 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
1709 (strncmp_iw_with_mode): Declare.
1711 2017-11-08 Keith Seitz <keiths@redhat.com>
1712 Pedro Alves <palves@redhat.com>
1714 * ada-lang.c (ada_language_defn): Install
1715 default_search_name_hash.
1716 * buildsym.c (struct buildsym_compunit): <language>: New field.
1717 (finish_block_internal): Pass language when creating dictionaries.
1718 (start_buildsym_compunit, start_symtab): New language parameters.
1720 (restart_symtab): Pass down compilation unit's language.
1721 * buildsym.h (enum language): Forward declare.
1722 (start_symtab): New 'language' parameter.
1723 * c-lang.c (c_language_defn, cplus_language_defn)
1724 (asm_language_defn, minimal_language_defn): Install
1725 default_search_name_hash.
1726 * coffread.c (coff_start_symtab): Adjust.
1727 * d-lang.c (d_language_defn): Install default_search_name_hash.
1728 * dbxread.c (struct symloc): Add 'pst_language' field.
1729 (PST_LANGUAGE): Define.
1730 (start_psymtab, read_ofile_symtab): Use it.
1731 (process_one_symbol): New 'language' parameter. Pass it down.
1732 * dictionary.c (struct dictionary) <language>: New field.
1733 (DICT_LANGUAGE): Define.
1734 (dict_create_hashed, dict_create_hashed_expandable)
1735 (dict_create_linear, dict_create_linear_expandable): New parameter
1736 'language'. Set the dictionary's language.
1737 (iter_match_first_hashed): Adjust to rename.
1738 (insert_symbol_hashed): Assert we don't see mismatching
1739 languages. Adjust to rename.
1740 (dict_hash): Rename to ...
1741 (default_search_name_hash): ... this and make extern.
1742 * dictionary.h (struct language_defn): Forward declare.
1743 (dict_create_hashed): New parameter 'language'.
1744 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
1745 * f-lang.c (f_language_defn): Install default_search_name_hash.
1746 * go-lang.c (go_language_defn): Install default_search_name_hash.
1747 * jit.c (finalize_symtab): Pass compunit's language to dictionary
1749 * language.c (unknown_language_defn, auto_language_defn):
1750 * language.h (language_defn::la_search_name_hash): New field.
1751 (default_search_name_hash): Declare.
1752 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
1753 * mdebugread.c (new_block): New parameter 'language'.
1754 * mdebugread.c (parse_symbol): Pass symbol language to block
1756 (psymtab_to_symtab_1): Pass down language.
1757 (new_symtab): Pass compunit's language to block allocation.
1758 * objc-lang.c (objc_language_defn): Install
1759 default_search_name_hash.
1760 * opencl-lang.c (opencl_language_defn):
1761 * p-lang.c (pascal_language_defn): Install
1762 default_search_name_hash.
1763 * rust-lang.c (rust_language_defn): Install
1764 default_search_name_hash.
1765 * stabsread.h (enum language): Forward declare.
1766 (process_one_symbol): Add 'language' parameter.
1767 * symtab.c (search_name_hash): New function.
1768 * symtab.h (search_name_hash): Declare.
1769 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
1771 2017-11-08 Pedro Alves <palves@redhat.com>
1773 * cp-name-parser.y (main): Don't initialize extra_chars.
1775 2017-11-07 Tom Tromey <tom@tromey.com>
1777 * event-top.h (command_handler): Constify.
1778 * record-full.c (cmd_record_full_start): Update.
1779 * thread.c (thread_apply_all_command): Update.
1780 * printcmd.c (eval_command): Update.
1781 * mi/mi-main.c (mi_execute_cli_command): Update.
1782 (mi_execute_async_cli_command): Update.
1783 * tui/tui-stack.c (tui_update_command): Update.
1784 * cli/cli-interp.c (safe_execute_command): Constify.
1785 * record.c (record_start): Update.
1786 (record_start, record_stop, cmd_record_start): Update.
1787 * record-btrace.c (cmd_record_btrace_bts_start): Update.
1788 (cmd_record_btrace_pt_start): Update.
1789 (cmd_record_btrace_start): Update.
1790 (cmd_record_btrace_start): Update.
1791 * reverse.c (exec_reverse_once): Update.
1792 * python/python.c (execute_gdb_command): Don't copy the command.
1793 * event-top.c (command_line_handler): Update.
1794 (command_handler): Constify.
1795 * defs.h (deprecated_call_command_hook): Constify.
1796 * cli/cli-script.h (execute_user_command): Constify.
1797 * cli/cli-script.c (execute_user_command): Constify.
1798 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
1799 (enum command_control_type): Update.
1800 * main.c (catch_command_errors): Remove non-const overload.
1801 (catch_command_errors_ftype): Remove.
1802 * python/py-cmd.c (cmdpy_function): Constify.
1803 * guile/scm-cmd.c (cmdscm_function): Constify.
1804 * cli/cli-dump.c (call_dump_func): Constify.
1805 * cli/cli-decode.c (do_const_cfunc): Constify.
1806 (do_sfunc): Constify.
1807 (cmd_func): Constify.
1808 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
1809 * top.h (execute_command): Constify.
1810 * top.c (execute_command): Constify.
1811 (execute_command_to_string): Constify.
1812 (deprecated_call_command_hook): Constify.
1813 * command.h (cmd_func): Constify.
1814 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
1816 2017-11-07 Tom Tromey <tom@tromey.com>
1818 * ada-lang.c (catch_ada_exception_command): Constify.
1819 (catch_assert_command): Constify.
1820 * break-catch-throw.c (catch_catch_command, catch_throw_command)
1821 (catch_rethrow_command): Constify.
1822 (catch_exception_command_1): Constify.
1823 * breakpoint.h (add_catch_command): Constify.
1824 * break-catch-syscall.c (catch_syscall_command_1): Constify.
1825 (catch_syscall_split_args): Constify.
1826 * break-catch-sig.c (catch_signal_command): Constify.
1827 (catch_signal_split_args): Constify.
1828 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
1829 cmd_const_sfunc_ftype.
1830 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
1831 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1832 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1833 (add_setshow_string_cmd, struct cmd_list_element)
1834 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1835 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1836 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
1838 (set_cmd_sfunc): Constify.
1839 (empty_sfunc): Constify.
1840 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
1841 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
1842 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
1843 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
1844 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
1845 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
1847 (set_cmd_sfunc): Constify.
1848 (cmd_sfunc_ftype): Remove.
1849 * compile/compile.c (set_compile_args): Constify.
1850 * infrun.c (set_disable_randomization): Constify.
1851 * infcmd.c (set_args_command, set_cwd_command): Constify.
1852 * breakpoint.c (set_condition_evaluation_mode): Constify.
1853 (add_catch_command): Constify.
1854 (catch_fork_command_1, catch_exec_command_1)
1855 (catch_load_command_1, catch_unload_command_1): Constify.
1856 (catch_load_or_unload): Constify.
1857 * guile/scm-param.c (pascm_set_func): Constify.
1858 (add_setshow_generic): Constify.
1859 * python/py-param.c (get_set_value): Constify.
1860 * top.h (set_verbose): Constify.
1861 * tui/tui-win.c (tui_set_var_cmd): Constify.
1862 * mi/mi-main.c (set_mi_async_command): Constify.
1863 * cli/cli-logging.c (set_logging_overwrite)
1864 (set_logging_redirect): Constify.
1865 * value.c (set_max_value_size): Constify.
1866 * valprint.c (set_input_radix, set_output_radix): Constify.
1867 * utils.c (set_width_command, set_height_command): Constify.
1868 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
1869 * tracepoint.c (set_disconnected_tracing)
1870 (set_circular_trace_buffer, set_trace_buffer_size)
1871 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
1872 * top.c (set_history_size_command, set_verbose, set_editing)
1873 (set_gdb_datadir, set_history_filename): Constify.
1874 * target.c (set_targetdebug, maint_set_target_async_command)
1875 (maint_set_target_non_stop_command, set_target_permissions)
1876 (set_write_memory_permission): Constify.
1877 (open_target): Constify.
1878 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
1879 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
1880 * symtab.c (set_symbol_cache_size_handler): Constify.
1881 * symfile.c (set_ext_lang_command): Constify.
1882 * symfile-debug.c (set_debug_symfile): Constify.
1883 * source.c (set_directories_command): Constify.
1884 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
1885 * serial.c (set_parity): Constify.
1886 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
1887 * remote.c (set_remote_exec_file, set_remotebreak)
1888 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
1889 * record.c (set_record_insn_history_size)
1890 (set_record_call_history_size): Constify.
1891 * record-full.c (set_record_full_insn_max_num): Constify.
1892 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
1893 * osabi.c (set_osabi): Constify.
1894 * mips-tdep.c (set_mips64_transfers_32bit_regs)
1895 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
1896 * maint.c (maintenance_set_profile_cmd): Constify.
1897 * linux-thread-db.c (set_libthread_db_search_path): Constify.
1898 * language.c (set_language_command, set_range_command)
1899 (set_case_command): Constify.
1900 * infrun.c (set_non_stop, set_observer_mode)
1901 (set_stop_on_solib_events, set_schedlock_func)
1902 (set_exec_direction_func): Constify.
1903 * infcmd.c (set_inferior_tty_command): Constify.
1904 * disasm.c (set_disassembler_options_sfunc): Constify.
1905 * demangle.c (set_demangling_command): Constify.
1906 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
1907 * cris-tdep.c (set_cris_version, set_cris_mode)
1908 (set_cris_dwarf2_cfi): Constify.
1909 * corefile.c (set_gnutarget_command): Constify.
1910 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
1911 (set_target_wide_charset_sfunc): Constify.
1912 * breakpoint.c (update_dprintf_commands): Constify.
1913 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
1914 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
1915 (set_disassembly_style_sfunc): Constify.
1916 * arch-utils.c (set_endian, set_architecture): Constify.
1917 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
1918 * agent.c (set_can_use_agent): Constify.
1920 2017-11-07 Tom Tromey <tom@tromey.com>
1922 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
1923 (go32_pde, go32_pte, go32_pte_for_address): Constify.
1924 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
1925 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
1926 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
1927 (parse_int_arg, show_thread_default_detach_sc_cmd)
1928 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
1929 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
1930 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
1931 (show_task_pause_cmd, set_task_detach_sc_cmd)
1932 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
1933 (set_noninvasive_cmd, set_thread_pause_cmd)
1934 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
1935 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
1936 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
1937 * windows-nat.c (display_selectors): Constify.
1938 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
1940 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
1941 (cmd_cfunc_eq): Likewise.
1942 (struct cmd_list_element): Likewise.
1944 (cli_user_command_p): Update.
1945 * command.h (add_cmd): Remove non-const overload.
1946 (cmd_cfunc_ftype): Remove typedef.
1947 (cmd_cfunc_eq): Remove non-const overload.
1948 * value.c (show_values): Constify.
1949 * thread.c (thread_apply_all_command): Constify.
1950 * symfile.c (load_command): Constify.
1951 * source.c (directory_command): Constify.
1952 * maint.c (maintenance_internal_error)
1953 (maintenance_demangler_warning, maintenance_space_display)
1954 (maintenance_print_architecture, maintenance_translate_address)
1955 (maintenance_info_selftests, maintenance_internal_warning):
1957 * breakpoint.c (disable_trace_command, enable_trace_command):
1959 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
1961 (add_auto_load_safe_path): Constify.
1962 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
1963 * top.h (show_commands): Constify.
1964 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
1965 * sparc64-tdep.c (adi_examine_command): Constify.
1966 (adi_assign_command): Constify.
1968 2017-11-07 Tom Tromey <tom@tromey.com>
1970 * frame.h (info_locals_command, info_args_command): Constify.
1971 * auto-load.h (auto_load_info_scripts): Constify.
1972 * inferior.h (registers_info): Constify.
1973 * copying.c: Rebuild.
1974 * copying.awk: Constify generated commands.
1975 * auto-load.c (auto_load_info_scripts)
1976 (info_auto_load_gdb_scripts): Constify.
1977 * cli/cli-decode.c (struct cmd_list_element): Take a
1978 cmd_const_cfunc_ftype.
1979 * command.h (add_info): Take a cmd_const_cfunc_ftype.
1980 * tui/tui-win.c (tui_all_windows_info): Constify.
1981 * python/py-auto-load.c (info_auto_load_python_scripts):
1983 * cli/cli-cmds.c (show_command): Remove non-const overload.
1984 * tracepoint.c (info_tvariables_command, info_scope_command):
1986 (info_static_tracepoint_markers_command): Constify.
1987 * thread.c (info_threads_command): Constify.
1988 (print_thread_info_1): Constify.
1989 * target.c (info_target_command): Constify.
1990 * symtab.c (info_sources_command, info_functions_command)
1991 (info_types_command): Constify.
1992 (info_variables_command): Remove non-const overload.
1993 * symfile.c (info_ext_lang_command): Constify.
1994 * stack.c (info_frame_command, info_locals_command)
1995 (info_args_command): Constify.
1996 (backtrace_command): Remove non-const overload.
1997 * source.c (info_source_command, info_line_command): Constify.
1998 * solib.c (info_sharedlibrary_command): Constify.
1999 * skip.c (info_skip_command): Constify.
2000 * ser-go32.c (info_serial_command): Constify.
2001 * reverse.c (info_bookmarks_command): Constify.
2002 * printcmd.c (info_symbol_command, info_address_command)
2003 (info_display_command): Constify.
2004 * osdata.c (info_osdata_command): Constify.
2005 * objc-lang.c (info_selectors_command, info_classes_command):
2007 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2008 * memattr.c (info_mem_command): Constify.
2009 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2010 * linux-fork.c (info_checkpoints_command): Constify.
2011 * infrun.c (info_signals_command): Constify.
2012 * inflow.c (info_terminal_command): Constify.
2013 * inferior.c (info_inferiors_command): Constify.
2014 (print_inferior): Constify.
2015 * infcmd.c (info_program_command, info_all_registers_command)
2016 (info_registers_command, info_vector_command)
2017 (info_float_command): Constify.
2018 (registers_info): Constify.
2019 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2020 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2022 * f-valprint.c (info_common_command): Constify.
2023 * dcache.c (info_dcache_command): Constify.
2024 (dcache_info_1): Constify.
2025 * darwin-nat-info.c (info_mach_tasks_command)
2026 (info_mach_task_command, info_mach_ports_command)
2027 (info_mach_port_command, info_mach_threads_command)
2028 (info_mach_thread_command, info_mach_regions_command)
2029 (info_mach_regions_recurse_command, info_mach_region_command)
2030 (info_mach_exceptions_command): Constify.
2031 (get_task_from_args): Constify.
2032 * cp-support.c (info_vtbl_command): Constify.
2033 * breakpoint.c (info_watchpoints_command)
2034 (info_tracepoints_command): Constify.
2035 (info_breakpoints_command): Remove non-const overload.
2036 * avr-tdep.c (avr_io_reg_read_command): Constify.
2037 * auxv.c (info_auxv_command): Constify.
2038 * ada-tasks.c (info_tasks_command): Constify.
2039 (info_task): Constify.
2040 * ada-lang.c (info_exceptions_command): Constify.
2042 2017-11-07 Tom Tromey <tom@tromey.com>
2044 * solib.h (no_shared_libraries): Constify.
2045 * frame.h (return_command): Constify.
2046 * cli/cli-cmds.h (quit_command): Constify.
2047 * top.h (quit_command, execute_command): Constify.
2048 * target.h (flash_erase_command): Constify.
2049 * inferior.h (set_inferior_args, attach_command): Constify.
2050 * tracepoint.h (start_tracing, stop_tracing): Constify.
2051 * breakpoint.h (break_command, tbreak_command)
2052 (hbreak_command_wrapper, thbreak_command_wrapper)
2053 (rbreak_command_wrapper, watch_command_wrapper)
2054 (awatch_command_wrapper, rwatch_command_wrapper)
2055 (get_tracepoint_by_number): Constify.
2056 * symtab.c (info_variables_command, rbreak_command)
2057 (symtab_symbol_info): Constify.
2058 (info_variables_command): Add non-const overload.
2059 * top.c (dont_repeat_command): Constify.
2060 * breakpoint.c (ignore_command, commands_command)
2061 (condition_command, tbreak_command, hbreak_command)
2062 (thbreak_command, clear_command, break_command)
2063 (info_breakpoints_command, watch_command, rwatch_command)
2064 (awatch_command, trace_command, ftrace_command, strace_command)
2065 (trace_pass_command, break_range_command, dprintf_command)
2066 (agent_printf_command, get_tracepoint_by_number)
2067 (watch_maybe_just_location, trace_pass_command): Constify.
2068 (info_breakpoints_command): Add non-const overload.
2069 * tracefile.c (tsave_command): Constify.
2070 * infcmd.c (attach_command, disconnect_command, signal_command)
2071 (queue_signal_command, stepi_command, nexti_command)
2072 (finish_command, next_command, step_command, until_command)
2073 (advance_command, jump_command, continue_command, run_command)
2074 (start_command, starti_command, interrupt_command)
2075 (run_command_1, set_inferior_args, step_1): Constify.
2076 * inferior.c (add_inferior_command, remove_inferior_command)
2077 (clone_inferior_command): Constify.
2078 * linux-fork.c (checkpoint_command, restart_command): Constify.
2079 * windows-nat.c (signal_event_command): Constify.
2080 * guile/guile.c (guile_repl_command, guile_command): Constify.
2081 * printcmd.c (x_command, display_command, printf_command)
2082 (output_command, set_command, call_command, print_command)
2083 (eval_command): Constify.
2084 (non_const_set_command): Remove.
2085 (_initialize_printcmd): Update.
2086 * source.c (forward_search_command, reverse_search_command):
2088 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2090 * infrun.c (handle_command): Constify.
2091 * memattr.c (mem_command): Constify.
2092 * stack.c (return_command, up_command, up_silently_command)
2093 (down_command, down_silently_command, frame_command)
2094 (backtrace_command, func_command, backtrace_command_1): Constify.
2095 (backtrace_command): Add non-const overload.
2096 * remote-sim.c (simulator_command): Constify.
2097 * exec.c (set_section_command): Constify.
2098 * tracepoint.c (tdump_command, trace_variable_command)
2099 (tstatus_command, tstop_command, tstart_command)
2100 (end_actions_pseudocommand, while_stepping_pseudocommand)
2101 (collect_pseudocommand, teval_pseudocommand, actions_command)
2102 (start_tracing, stop_tracing): Constify.
2103 * value.c (init_if_undefined_command): Constify.
2104 * tui/tui-stack.c (tui_update_command): Constify.
2105 * tui/tui-win.c (tui_refresh_all_command)
2106 (tui_set_tab_width_command, tui_set_win_height_command)
2107 (tui_set_focus_command, tui_scroll_forward_command)
2108 (tui_scroll_backward_command, tui_scroll_left_command)
2109 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2110 (tui_set_win_height): Constify.
2111 * tui/tui-layout.c (tui_layout_command): Constify.
2112 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2113 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2114 (proc_untrace_sysexit_cmd): Constify.
2115 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2116 (threadset_test_cmd, threadlist_update_test_cmd)
2117 (threadalive_test): Constify.
2118 * objc-lang.c (print_object_command): Constify.
2119 * command.h (add_com): Constify.
2120 * cli/cli-dump.c (restore_command): Constify.
2121 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2122 (help_command, complete_command, shell_command, edit_command)
2123 (list_command, disassemble_command, make_command)
2124 (apropos_command, alias_command): Constify.
2125 * cli/cli-script.c (document_command, define_command)
2126 (while_command, if_command, validate_comname): Constify.
2127 * cli/cli-decode.c (struct cmd_list_element): Change type of
2129 * target.c (do_monitor_command, flash_erase_command): Constify.
2130 * regcache.c (reg_flush_command): Constify.
2131 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2132 (reverse_nexti, reverse_continue, reverse_finish)
2133 (save_bookmark_command, goto_bookmark_command)
2134 (exec_reverse_once): Constify.
2135 * python/python.c (python_interactive_command, python_command):
2137 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2139 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2140 * gcore.c (gcore_command): Constify.
2142 2017-11-07 Tom Tromey <tom@tromey.com>
2144 * printcmd.c (x_command): Call set_repeat_arguments.
2145 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2146 * top.c (repeat_arguments): New global.
2147 (set_repeat_arguments): New function.
2148 (execute_command): Handle repeat_arguments.
2149 (show_commands): Calls set_repeat_arguments.
2150 * command.h (set_repeat_arguments): Declare.
2152 2017-11-07 Tom Tromey <tom@tromey.com>
2154 * stack.c (backtrace_command): Use std::string.
2155 (backtrace_command_1): Make "count_exp" const.
2157 2017-11-07 Tom Tromey <tom@tromey.com>
2159 * source.c (directory_switch, mod_path, add_path): Constify.
2160 * defs.h (add_path, mod_path, directory_switch): Constify.
2161 * mi/mi-cmd-env.c (env_mod_path): Constify.
2163 2017-11-07 Tom Tromey <tom@tromey.com>
2165 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2166 (run_command_1, continue_command, step_1, jump_command)
2167 (signal_command, until_command, advance_command, finish_command)
2168 (attach_command): Update.
2170 2017-11-07 Tom Tromey <tom@tromey.com>
2172 * command.h (set_cmd_cfunc): Don't declare.
2173 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2175 2017-11-07 Tom Tromey <tom@tromey.com>
2177 * stack.c (select_frame_command): Constify.
2178 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2179 * command.h (add_com_suppress_notification): Constify.
2181 2017-11-07 Tom Tromey <tom@tromey.com>
2183 * breakpoint.c (stop_command): Constify.
2184 * cli/cli-decode.c (struct cmd_list_element): Constify.
2185 * command.h (add_abbrev_prefix_cmd): Constify.
2187 2017-11-07 Pedro Alves <palves@redhat.com>
2189 * breakpoint.c (extract_bp_kind): New enum.
2190 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2191 factored out from ...
2192 (extract_bp_number_and_location): ... here.
2193 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2195 2017-11-07 Pedro Alves <palves@redhat.com>
2197 * breakpoint.c (extract_bp_number_and_location): Change return
2198 type to void. Throw error instead of warning.
2199 (enable_disable_command): Adjust.
2201 2017-11-07 Xavier Roirand <roirand@adacore.com>
2202 Pedro Alves <palves@redhat.com>
2204 * breakpoint.c (map_breakpoint_number_range): New, factored out
2206 (map_breakpoint_numbers): ... here.
2207 (find_location_by_number): Change parameters from string to
2208 breakpoint number and location.
2209 (extract_bp_number_and_location): New function.
2210 (enable_disable_bp_num_loc)
2211 (enable_disable_breakpoint_location_range)
2212 (enable_disable_command): New functions, factored out ...
2213 (enable_command, disable_command): ... these functions, and
2214 adjusted to support ranges.
2215 * NEWS: Document enable/disable breakpoint location range feature.
2217 2017-11-06 Luis Machado <luis.machado@linaro.org>
2219 * MAINTAINERS (Write After Approval): Update my e-mail address.
2221 2017-11-06 Pedro Alves <palves@redhat.com>
2223 * gnu-nat.c (gnu_terminal_init): Delete.
2224 (gnu_target): Don't install gnu_terminal_init.
2225 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2226 (child_terminal_init): ... this function.
2228 2017-11-06 Pedro Alves <palves@redhat.com>
2230 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2232 * config.in, configure: Regenerate.
2234 2017-11-06 Pedro Alves <palves@redhat.com>
2236 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2237 (async_init_signals): Adjust.
2238 (handle_stop_sig): Rename to ...
2239 (handle_sigtstp): ... this.
2240 (async_stop_sig): Rename to ...
2241 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2243 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2244 instead of STOP_SIGNAL thoughout.
2245 (handle_stop_sig): Rename to ...
2246 (handle_sigtstp): ... this.
2247 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2249 2017-11-06 Pedro Alves <palves@redhat.com>
2251 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2252 longer set flags twice in row.
2254 2017-11-06 Pedro Alves <palves@redhat.com>
2256 * Makefile.in (SER_HARDWIRE): Update comment.
2257 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2258 * common/gdb_termios.h: Delete file.
2259 * common/job-control.c: Include termios.h and unistd.h instead of
2261 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2263 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2265 * configure.ac: No longer check for termio.h and sgtty.h.
2266 * configure: Regenerate.
2267 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2268 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2269 Replace PROCESS_GROUP_TYPE references with pid_t references
2271 (gdb_getpgrp): Delete.
2272 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2273 (child_terminal_inferior): Remove comment. Remove sgtty code.
2274 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2275 gdb_getpgrp. Use serial_set_tty_state instead aof
2276 serial_noflush_set_tty_state. Remove sgtty code.
2277 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2278 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2279 (inferior_process_group): Now returns pid_t.
2280 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2281 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2282 * ser-event.c (serial_event_ops): Update.
2283 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2285 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2286 * ser-pipe.c (pipe_ops): Update.
2287 * ser-tcp.c (tcp_ops): Update.
2288 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2289 HAVE_TERMIOS checks.
2290 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2291 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2292 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2294 (hardwire_noflush_set_tty_state): Delete.
2295 (hardwire_print_tty_state, hardwire_drain_output)
2296 (hardwire_flush_output, hardwire_flush_input)
2297 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2298 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2299 code, and assume termios.
2300 (hardwire_ops): Update.
2301 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2302 * serial.c (serial_noflush_set_tty_state): Delete.
2303 * serial.h (serial_noflush_set_tty_state): Delete.
2304 (serial_ops::noflush_set_tty_state): Delete.
2306 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2308 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2309 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2310 (COMMON_OBS): Remove doublest.o and dfp.o.
2311 Do not build target-float.c (instead of doublest.c)
2312 with -Wformat-nonliteral.
2314 * doublest.c: Remove file.
2315 * doublest.h: Remove file.
2316 * dfp.c: Remove file.
2317 * dfp.h: Remove file.
2319 * target-float.c: Do not include "doublest.h" and "dfp.h".
2320 (DOUBLEST): Move here from doublest.h.
2321 (enum float_kind): Likewise.
2322 (FLOATFORMAT_CHAR_BIT): Likewise.
2323 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2324 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2325 (floatformat_precision): Likewise.
2326 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2327 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2329 (host_float_format, host_double_format, host_long_double_format):
2331 (floatformat_to_string, floatformat_from_string): Likewise.
2332 (floatformat_to_doublest): Likewise. Also, inline the original
2333 convert_floatformat_to_doublest.
2334 (floatformat_from_doublest): Likewise. Also, inline the original
2335 convert_floatformat_from_doublest.
2337 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2338 (MAX_DECIMAL_STRING): Move here from dfp.c.
2339 (match_endianness): Likewise.
2340 (set_decnumber_context, decimal_check_errors): Likewise.
2341 (decimal_from_number, decimal_to_number): Likewise.
2342 (decimal_to_string, decimal_from_string): Likewise. Make static.
2343 (decimal_from_longest, decimal_from_ulongest): Likewise.
2344 (decimal_to_longest): Likewise.
2345 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2346 (decimal_convert): Likewise.
2348 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2350 * doublest.c: Do not include "gdbtypes.h".
2351 (extract_typed_floating): Remove.
2352 (store_typed_floating): Remove.
2353 (convert_typed_floating): Remove.
2354 * doublest.h (struct type): Remove.
2355 (DOUBLEST_PRINT_FORMAT): Remove.
2356 (DOUBLEST_SCAN_FORMAT): Remove.
2357 (extract_typed_floating): Remove.
2358 (store_typed_floating): Remove.
2359 (convert_typed_floating): Remove.
2361 * dfp.c (decimal_from_doublest): Remove.
2362 (decimal_to_doublest): Remove.
2363 * dfp.h: Do not include "doublest.h".
2364 (decimal_from_doublest): Remove.
2365 (decimal_to_doublest): Remove.
2367 * value.c: Do not include "doublest.h" and "dfp.h".
2368 (value_as_double): Remove.
2369 (unpack_double): Remove.
2370 (value_from_double): Remove.
2371 (value_from_decfloat): Remove.
2372 * value.h: Do not include "doublest.h".
2373 (value_as_double): Remove.
2374 (unpack_double): Remove.
2375 (value_from_double): Remove.
2376 (value_from_decfloat): Remove.
2378 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2380 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2381 (i386_extract_return_value): Use target_float_convert.
2382 (i386_store_return_value): Likewise.
2383 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2384 (i387_value_to_register): Likewise.
2385 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2386 (ia64_register_to_value): Use target_float_convert.
2387 (ia64_value_to_register): Likewise.
2388 (ia64_extract_return_value): Likewise.
2389 (ia64_store_return_value): Likewise.
2390 (ia64_push_dummy_call): Likewise.
2391 * m68k-tdep.c: Include "target-float.h".
2392 (m68k_register_to_value): Use target_float_convert.
2393 (m68k_value_to_register): Likewise.
2394 (m68k_svr4_extract_return_value): Likewise.
2395 (m68k_svr4_store_return_value): Likewise.
2396 * ppc-sysv-tdep.c: Include "target-float.h".
2397 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
2398 (do_ppc_sysv_return_value): Likewise.
2399 (ppc64_sysv_abi_push_freg): Likewise.
2400 (ppc64_sysv_abi_return_value_base): Likewise.
2401 * rs6000-aix-tdep.c: Include "target-float.h".
2402 (rs6000_push_dummy_call): Use target_float_convert.
2403 (rs6000_return_value): Likewise.
2404 * rs6000-lynx178-tdep.c: Include "target-float.h".
2405 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
2406 (rs6000_lynx178_return_value): Likewise.
2407 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
2408 (rs6000_register_to_value): Use target_float_convert.
2409 (rs6000_value_to_register): Likewise.
2410 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
2411 (arm_extract_return_value): Use target_float_convert.
2412 (arm_store_return_value): Likewise.
2413 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
2414 (sh_register_convert_to_virtual): Use target_float_convert.
2415 (sh_register_convert_to_raw): Likewise.
2416 * sh64-tdep.c: Include "target-float.h".
2417 (sh64_extract_return_value): Use target_float_convert.
2418 (sh64_register_convert_to_virtual): Likewise.
2419 (sh64_register_convert_to_raw): Likewise. Fix argument types.
2421 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2423 * target-float.c (floatformat_to_host_double): New function.
2424 (floatformat_from_host_double): Likewise.
2425 (target_float_to_host_double): Likewise.
2426 (target_float_from_host_double): Likewise.
2427 * target-float.h (target_float_to_host_double): Add prototype.
2428 (target_float_from_host_double): Likewise.
2430 * guile/scm-value.c: Include "target-float.h".
2431 (gdbscm_value_to_real): Use target_float_to_host_double.
2432 Handle integer source values via value_as_long.
2433 * guile/scm-math.c: Include "target-float.h". Do not include
2434 "doublest.h", "dfp.h", and "expression.h".
2435 (vlscm_convert_typed_number): Use target_float_from_host_double.
2436 (vlscm_convert_number): Likewise.
2438 * python/py-value.c (valpy_float): Use target_float_to_host_double.
2439 (convert_value_from_python): Use target_float_from_host_double.
2441 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2443 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
2444 (cast_from_fixed): Likewise.
2445 (ada_scaling_type): New function.
2446 (ada_delta): Return value instead of DOUBLEST. Perform target
2447 arithmetic instead of host arithmetic.
2448 (scaling_factor): Rename to ...
2449 (ada_scaling_factor) ... this. Make non-static. Return value instead
2450 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
2451 (ada_fixed_to_float): Remove.
2452 (ada_float_to_fixed): Remove.
2453 * ada-lang.h (ada_fixed_to_float): Remove.
2454 (ada_float_to_fixed): Remove.
2455 (ada_delta): Return value instead of DOUBLEST.
2456 (ada_scaling_factor): Add prototype.
2458 * ada-typeprint.c: Include "target-float.h".
2459 (print_fixed_point_type): Perform target arithmetic instead of
2461 * ada-valprint.c: Include "target-float.h".
2462 (ada_val_print_num): Perform target arithmetic instead of
2463 host arithmetic for fixed-point types.
2465 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2467 * target-float.c: Include <math.h>.
2468 (floatformat_binop): New function.
2469 (floatformat_compare): Likewise.
2470 (target_float_binop): Likewise.
2471 (target_float_compare): Likewise.
2472 * target-float.h: Include "expression.h".
2473 (target_float_binop): Add prototype.
2474 (target_float_compare): Likewise.
2476 * valarith.c: Do not include "doublest.h" and "dfp.h".
2477 Include "common/byte-vector.h".
2478 (value_args_as_decimal): Remove, replace by ...
2479 (value_args_as_target_float): ... this function. Handle both
2480 binary and decimal target floating-point formats.
2481 (scalar_binop): Handle both binary and decimal FP using
2482 value_args_as_target_float and target_float_binop.
2483 (value_equal): Handle both binary and decimal FP using
2484 value_args_as_target_float and target_float_compare.
2485 (value_less): Likewise.
2486 (value_pos): Handle all scalar types as simple copy.
2487 (value_neg): Handle all scalar types via BINOP_SUB from 0.
2488 * dfp.c (decimal_binop): Throw error instead of internal_error
2489 when called with an unsupported operation code.
2491 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2493 * target-float.c (target_float_to_string): New function.
2494 (target_float_from_string): New function.
2495 * target-float.h (target_float_to_string): Add prototype.
2496 (target_float_from_string): Add prototype.
2498 * valprint.c: Include "target-float.h". Do not include
2499 "doublest.h" and "dfp.h".
2500 (print_floating): Use target_float_to_string.
2501 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
2502 (printf_floating): Use target_float_to_string.
2503 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
2504 (print_i387_value): Use target_float_to_string.
2505 * mips-tdep.c: Include "target-float.h".
2506 (mips_print_fp_register): Use target_float_to_string.
2507 * sh64-tdep.c: Include "target-float.h".
2508 (sh64_do_fp_register): Use target_float_to_string.
2510 * parse.c: Include "target-float.h". Do not include
2511 "doublest.h" and "dfp.h".
2512 (parse_float): Use target_float_from_string.
2513 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
2514 (define_symbol): Use target_float_from_string.
2515 * gdbarch-selftests.c: Include "target-float.h".
2516 (register_to_value_test): Use target_float_from_string.
2518 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2520 * Makefile.c (SFILES): Add target-float.c.
2521 (HFILES_NO_SRCDIR): Add target-float.h.
2522 (COMMON_OBS): Add target-float.o.
2523 * target-float.h: New file.
2524 * target-float.c: New file.
2526 * doublest.c (floatformat_classify): Fix detection of float_zero.
2528 * gdbtypes.c (is_floating_type): New function.
2529 * gdbtypes.h (is_floating_type): Add prototype.
2531 * value.c: Do not include "floatformat.h".
2532 (unpack_double): Use target_float_is_valid.
2533 (is_floating_value): New function.
2534 * value.h (is_floating_value): Add prototype-
2536 * valarith.c: Include "target-float.h".
2537 (value_logical_not): Use target_float_is_zero.
2539 * python/py-value.c: Include "target-float.h".
2540 (valpy_nonzero): Use target_float_is_zero.
2542 2017-11-04 Tom Tromey <tom@tromey.com>
2544 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
2546 2017-11-04 Tom Tromey <tom@tromey.com>
2548 * breakpoint.c (set_momentary_breakpoint): Return
2550 (until_break_command): Update.
2551 (new_until_break_fsm): Change argument types to
2553 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2554 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
2556 * infcmd.c (finish_forward): Update.
2557 * breakpoint.h (set_momentary_breakpoint)
2558 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
2559 (make_cleanup_delete_breakpoint): Remove.
2560 (struct breakpoint_deleter): New.
2561 (breakpoint_up): New typedef.
2562 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
2563 (insert_exception_resume_breakpoint): Update.
2564 (insert_exception_resume_from_probe): Update.
2565 (insert_longjmp_resume_breakpoint): Update.
2566 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
2567 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
2568 * infcall.c (call_function_by_hand_dummy): Update
2570 2017-11-04 Tom Tromey <tom@tromey.com>
2572 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
2574 2017-11-04 Tom Tromey <tom@tromey.com>
2576 * linux-tdep.c (linux_core_info_proc_mappings): Use
2578 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
2580 (linux_corefile_thread): Update.
2581 (linux_make_corefile_notes): Remove unused variable.
2583 2017-11-04 Tom Tromey <tom@tromey.com>
2585 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
2588 2017-11-04 Tom Tromey <tom@tromey.com>
2590 * objfiles.c (do_free_objfile_cleanup): Remove.
2591 * compile/compile-object-load.c (compile_object_load): Update.
2592 * objfiles.h (make_cleanup_free_objfile): Remove.
2594 2017-11-04 Tom Tromey <tom@tromey.com>
2596 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
2597 (adi_read_versions): Change "tags" to "gdb_byte *".
2598 (adi_print_versions): Likewise.
2600 2017-11-04 Tom Tromey <tom@tromey.com>
2603 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
2604 from start_rbreak_breakpoints.
2605 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
2606 * breakpoint.h (class scoped_rbreak_breakpoints): New.
2607 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
2608 * symtab.c (do_end_rbreak_breakpoints): Remove.
2609 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
2611 2017-11-04 Tom Tromey <tom@tromey.com>
2613 * cp-namespace.c (reset_directive_searched): Remove.
2614 (cp_lookup_symbol_via_imports): Use scoped_restore.
2615 * cp-support.c (reset_directive_searched): Remove.
2616 (make_symbol_overload_list_using): Use scoped_restore.
2617 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
2618 (reset_directive_searched): Remove.
2620 2017-11-04 Tom Tromey <tom@tromey.com>
2622 * symfile.c (find_separate_debug_file_by_debuglink): Use
2625 2017-11-04 Tom Tromey <tom@tromey.com>
2627 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2629 (compute_stack_depth): Likewise.
2630 (do_compile_dwarf_expr_to_c): Use std::vector.
2632 2017-11-04 Tom Tromey <tom@tromey.com>
2634 * compile/compile-object-load.c (link_callbacks_einfo): Use
2637 2017-11-04 Tom Tromey <tom@tromey.com>
2639 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2640 Use scoped_free_pendings.
2641 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
2642 scoped_free_pendings.
2643 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
2644 (xcoff_initial_scan): Likewise.
2645 * buildsym.c (reset_symtab_globals): Update comment.
2646 (scoped_free_pendings): Rename from really_free_pendings.
2647 (prepare_for_building): Update comment.
2648 (buildsym_init): Likewise.
2649 * buildsym.h (class scoped_free_pendings): New class.
2650 (really_free_pendings): Don't declare.
2652 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
2654 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
2655 output when converting a zero value to a special byteorder format.
2657 2017-11-02 Yao Qi <yao.qi@linaro.org>
2659 * frame.c (do_frame_register_read): Remove aspace.
2660 * jit.c (jit_frame_sniffer): Likwise.
2661 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2662 * regcache.c (regcache::regcache): Pass nullptr.
2663 (regcache_print): Caller updated.
2664 * regcache.h (regcache::regcache): Remove one constructor
2667 2017-11-02 Yao Qi <yao.qi@linaro.org>
2669 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
2671 2017-11-02 Yao Qi <yao.qi@linaro.org>
2673 * breakpoint.c (insert_single_step_breakpoints): Update.
2674 * frame.c (struct frame_info) <aspace>: Add const.
2675 (frame_save_as_regcache): Add const.
2676 (get_frame_address_space): Return const address_space *.
2677 * frame.h (get_frame_address_space): Update declaration.
2678 * infrun.c (struct step_over_info) <aspace>: Add const.
2679 (set_step_over_info): Make aspace const.
2680 (displaced_step_prepare_throw): Change variable const.
2682 (proceed): Likewise.
2683 (adjust_pc_after_break): Likewise.
2684 (save_waitstatus): Likewise.
2685 (handle_signal_stop): Likewise.
2686 (keep_going_pass_signal): Likewise.
2687 * jit.c (jit_frame_sniffer): Add const.
2688 * mips-tdep.c (mips_single_step_through_delay): Likewise.
2689 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
2690 * record-full.c (record_full_wait_1): Likewise.
2691 * regcache.c (regcache::regcache): Change parameter to const.
2692 * regcache.h (regcache::regcache): Likewise.
2693 (regcache::aspace): Return const address_space *.
2694 (regcache) <m_aspace>: Add const.
2696 2017-11-02 Yao Qi <yao.qi@linaro.org>
2698 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
2699 * frame.c (create_sentinel_frame): Likewise.
2700 * infrun.c (displaced_step_prepare_throw): Likewise.
2702 (thread_still_needs_step_over_bp): Likewise.
2703 (proceed): Likewise.
2704 (do_target_wait): Likewise.
2705 (adjust_pc_after_break): Likewise.
2706 (handle_syscall_event): Likewise.
2707 (save_waitstatus): Likewise.
2708 (handle_inferior_event_1): Likewise.
2709 (handle_signal_stop): Likewise.
2710 (keep_going_pass_signal): Likewise.
2711 * linux-nat.c (status_callback): Likewise.
2712 (save_stop_reason): Likewise.
2713 (resume_stopped_resumed_lwps): Likewise.
2714 * record-full.c (record_full_exec_insn): Likewise.
2715 (record_full_wait_1): Likewise.
2716 * regcache.c (get_regcache_aspace): Remove.
2717 * regcache.h (get_regcache_aspace): Remove.
2719 2017-11-02 Yao Qi <yao.qi@linaro.org>
2721 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
2722 (init_regcache_descr): Use gdbarch_num_regs.
2723 (regcache::regcache): Likewise.
2724 (regcache::get_register_status): Likewise.
2725 (regcache::assert_raw_regnum): Likewise.
2726 (regcache::cooked_read): Likewise.
2727 (regcache::cooked_read_value): Likewise.
2728 (regcache::cooked_write): Likewise.
2729 (regcache::dump): Likewise.
2730 (regcache::num_raw_registers): New method.
2731 * regcache.h (class regcache) <num_raw_registers>: New.
2733 2017-11-02 Yao Qi <yao.qi@linaro.org>
2735 * regcache.c (regcache::assert_regnum): New method.
2736 (regcache::invalidate): Call assert_regnum.
2737 (regcache::raw_update): Likewise.
2738 (regcache::raw_write): Likewise.
2739 (regcache::raw_read_part): Likewise.
2740 (regcache::raw_write_part): Likewise.
2741 (regcache::raw_supply): Likewise.
2742 (regcache::raw_supply_integer): Likewise.
2743 (regcache::raw_supply_zeroed): Likewise.
2744 (regcache::raw_collect): Likewise.
2745 (regcache::raw_collect_integer): Likewise.
2746 * regcache.h (regcache::assert_regnum): Declare.
2748 2017-11-02 Yao Qi <yao.qi@linaro.org>
2750 * regcache.c (regcache::dump): Remove code.
2752 2017-11-02 Yao Qi <yao.qi@linaro.org>
2754 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
2756 <sizeof_cooked_register_status>: Remove.
2757 (init_regcache_descr): Update.
2758 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
2759 (regcache::save): Likewise.
2760 (regcache::dump): Likewise.
2762 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2764 * ft32-tdep.c (ft32_fetch_instruction): New function.
2765 (ft32_analyze_prologue): Use ft32_fetch_instruction().
2767 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
2769 * cli/cli-script.c (execute_control_command): Rename to ...
2770 (execute_control_command_1): ... this.
2771 (execute_control_command): New function.
2773 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
2775 * tracepoint.c (tfind_command): Remove const_cast.
2777 2017-10-30 Mike Gulick <mgulick@mathworks.com>
2779 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
2781 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
2783 * common/common-utils.h (in_inclusive_range): New function.
2784 * arm-tdep.c (arm_record_extension_space): Use
2786 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
2787 * cris-tdep.c (cris_spec_reg_applicable): Use
2790 2017-10-30 Pedro Alves <palves@redhat.com>
2791 Simon Marchi <simon.marchi@ericsson.com>
2793 * remote.c (remote_set_syscall_catchpoint): Build a std::string
2794 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
2796 2017-10-30 Pedro Alves <palves@redhat.com>
2798 * common/common-utils.c (string_appendf, string_vappendf): New
2800 * common/common-utils.h (string_appendf, string_vappendf): New
2802 * unittests/common-utils-selftests.c (string_appendf_func)
2803 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
2804 (string_vappendf_tests): New functions.
2805 (_initialize_common_utils_selftests): Register "string_appendf" and
2806 "string_vappendf tests".
2808 2017-10-30 Pedro Alves <palves@redhat.com>
2810 * unittests/common-utils-selftests.c (format_func): New typedef.
2811 (string_printf_tests, string_vprintf_tests): Tests factored out
2813 (test_format_func): ... this new function.
2814 (string_printf_tests, string_vprintf_tests): Reimplement on top of
2817 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2819 * darwin-nat.c: Remove include of gdb.h.
2821 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2823 * xtensa-xtregs.c: Fix formatting issues.
2825 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
2827 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
2829 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
2832 * python/py-infthread.c (thpy_get_inferior): Increment reference
2833 of inferior before returning it.
2835 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2837 * unittests/common-utils-selftests.c (format): Add
2840 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2842 * xml-syscall.c (struct syscall_desc): Add constructor.
2843 <name>: Change type to std::string.
2844 (syscall_desc_up): New typedef.
2845 (syscall_desc_p): Remove typeder.
2846 (DEF_VEC_P(syscall_desc_p)): Remove.
2847 (struct syscall_group_desc): Add constructor.
2848 <name>: Change type to std::string.
2849 <syscalls>: Change type to std::vector.
2850 (syscall_group_desc_up): New typedef.
2851 (syscall_group_desc_p): Remove typedef.
2852 (DEF_VEC_P(syscall_group_desc_p)): Remove.
2853 (struct syscalls_info) <syscalls>: Change type to std::vector of
2856 <my_gdb_datadir>: Change type to std::string.
2857 (syscalls_info_up): New typedef.
2858 (allocate_syscalls_info): Remove.
2859 (syscalls_info_free_syscalls_desc): Remove.
2860 (syscalls_info_free_syscall_group_desc): Remove.
2861 (free_syscalls_info): Remove.
2862 (make_cleanup_free_syscalls_info): Remove.
2863 (syscall_group_create_syscall_group_desc): Adjust.
2864 (syscall_group_add_syscall): Adjust.
2865 (syscall_create_syscall_desc): Adjust.
2866 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
2867 (init_syscalls_info): Adjust.
2868 (syscall_group_get_group_by_name): Adjust.
2869 (xml_get_syscall_number): Adjust.
2870 (xml_get_syscall_name): Adjust.
2871 (xml_list_of_syscalls): Adjust.
2872 (xml_list_syscalls_by_group): Adjust.
2873 (xml_list_of_groups): Adjust.
2875 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2877 * probe.h: Don't include gdb_vecs.h.
2878 (DEF_VEC_P (probe_p)): Remove.
2879 (find_probes_in_objfile): Return an std::vector.
2880 * probe.c (find_probes_in_objfile): Likewise.
2881 * breakpoint.c (breakpoint_objfile_data)
2882 <longjmp_probes>: Change type to std::vector.
2883 <exception_probes>: Likewise.
2884 (free_breakpoint_probes): Don't manually free vectors.
2885 (create_longjmp_master_breakpoint): Adjust.
2886 (create_exception_master_breakpoint): Adjust.
2887 * solib-svr4.c (svr4_create_probe_breakpoints): Change
2888 parameter type, adjust.
2889 (svr4_create_solib_event_breakpoints): Adjust.
2891 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2893 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
2894 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
2896 (free_breakpoint_probes): Rename to ...
2897 (free_breakpoint_objfile_data): ... this, and call delete on
2900 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
2902 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
2903 (loaded_script_ptr): Remove typedef.
2904 (DEF_VEC_P (loaded_script_ptr)): Remove.
2905 (struct collect_matching_scripts_data): Add constructor.
2906 <scripts_p>: Change type to (pointer to) std::vector.
2907 (collect_matching_scripts_data): Adjust.
2908 (sort_scripts_by_name): Make suitable for std::sort.
2909 (print_scripts): Don't sort vector, adjust to std::vector.
2910 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
2912 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2914 * symfile.c (filename_language): Make struct, not typedef. Add
2916 <ext>: Change type to std::string.
2917 (DEF_VEC_O (filename_language)): Remove.
2918 (filename_language_table): Change type to std::vector.
2919 (add_filename_language): Adjust.
2920 (set_ext_lang_command): Adjust.
2921 (info_ext_lang_command): Adjust.
2922 (deduce_language_from_filename): Adjust.
2923 (class scoped_restore_filename_language_table): Remove.
2924 (test_filename_language): Use scoped_restore.
2925 (test_set_ext_lang_command): Use scoped_restore, adjust to
2928 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2930 * symfile.c: Include selftest.h.
2931 (class scoped_restore_filename_language_table): New.
2932 (test_filename_language): New test.
2933 (test_set_ext_lang_command): New test.
2934 (_initialize_symfile): Register tests.
2936 2017-10-27 Keith Seitz <keiths@redhat.com>
2938 * breakpoint.c (print_breakpoint_location): Use the symbol saved
2939 in the bp_location, falling back to find_pc_sect_function when
2941 (add_location_to_breakpoint): Save sal->symbol.
2942 * breakpoint.h (struct bp_location) <symbol>: New field.
2943 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
2944 * symtab.h (struct symtab_and_line) <symbol>: New field.
2946 2017-10-26 Patrick Frants <osscontribute@gmail.com>
2949 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
2952 2017-10-26 Pedro Alves <palves@redhat.com>
2954 * remote.c (remote_async_terminal_ours_p): Delete.
2955 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
2956 Remove references to 'remote_async_terminal_ours_p'.
2958 2017-10-26 Yao Qi <yao.qi@linaro.org>
2960 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
2962 2017-10-26 Yao Qi <yao.qi@linaro.org>
2964 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
2966 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
2968 * breakpoint.c (bpstat_check_location): Remove cast.
2969 (breakpoint_hit_catch_fork): Make aspce const.
2970 (breakpoint_hit_catch_solib): Likewise.
2971 (breakpoint_hit_catch_exec): Likewise.
2972 (breakpoint_hit_ranged_breakpoint): Likewise.
2973 (breakpoint_hit_watchpoint): Likewise.
2974 (base_breakpoint_breakpoint_hit): Likewise.
2975 (bkpt_breakpoint_hit): Likewise.
2976 (dprintf_breakpoint_hit): Likewise.
2977 (tracepoint_breakpoint_hit): Likewise.
2978 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
2980 2017-10-26 Yao Qi <yao.qi@linaro.org>
2982 * breakpoint.c (breakpoint_location_address_match): Change
2983 "struct address_space *" to "const address_space".
2984 (breakpoint_location_address_range_overlap): Likewise.
2985 (breakpoint_here_p): Likewise.
2986 (breakpoint_in_range_p): Likewise.
2987 (moribund_breakpoint_here_p): Likewise.
2988 (bp_location_inserted_here_p): Likewise.
2989 (software_breakpoint_inserted_here_p): Likewise.
2990 (hardware_breakpoint_inserted_here_p): Likewise.
2991 (hardware_watchpoint_inserted_in_range): Likewise.
2992 (bpstat_check_location): Likewise.
2993 (bpstat_stop_status): Likewise.
2994 (breakpoint_address_match): Likewise.
2995 (breakpoint_address_match_range): Likewise.
2996 (breakpoint_location_address_match): Likewise.
2997 (breakpoint_location_address_range_overlap): Likewise.
2998 (insert_single_step_breakpoint): Likewise.
2999 (breakpoint_has_location_inserted_here): Likewise.
3000 (single_step_breakpoint_inserted_here_p): Likewise.
3001 (pc_at_non_inline_function): Likewise.
3002 * breakpoint.h (bpstat_stop_status): Update declaration.
3003 (breakpoint_here_p): Likewise.
3004 (breakpoint_in_range_p): Likewise.
3005 (moribund_breakpoint_here_p): Likewise.
3006 (breakpoint_inserted_here_p): Likewise.
3007 (software_breakpoint_inserted_here_p): Likewise.
3008 (hardware_breakpoint_inserted_here_p): Likewise.
3009 (breakpoint_has_location_inserted_here): Likewise.
3010 (single_step_breakpoint_inserted_here_p): Likewise.
3011 (hardware_watchpoint_inserted_in_range): Likewise.
3012 (breakpoint_address_match): Likewise.
3013 (insert_single_step_breakpoint): Likewise.
3014 (pc_at_non_inline_function): Likewise.
3015 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3016 * record.c (record_check_stopped_by_breakpoint): Likewise.
3017 * record.h (record_check_stopped_by_breakpoint): Likewise.
3018 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3020 2017-10-25 Yao Qi <yao.qi@linaro.org>
3022 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3023 regcache->arch () instead get_regcache_arch.
3024 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3026 (aarch64_fbsd_store_inferior_registers): Likewise.
3027 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3028 (store_gregs_to_thread): Likewise.
3029 (fetch_fpregs_from_thread): Likewise.
3030 (store_fpregs_to_thread): Likewise.
3031 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3032 (aarch64_store_return_value): Likewise.
3033 (aarch64_software_single_step): Likewise.
3034 * aix-thread.c (aix_thread_wait): Likewise.
3035 (supply_reg32): Likewise.
3036 (supply_sprs64): Likewise.
3037 (supply_sprs32): Likewise.
3038 (fill_gprs64): Likewise.
3039 (fill_gprs32): Likewise.
3040 (fill_sprs64): Likewise.
3041 (fill_sprs32): Likewise.
3042 (store_regs_user_thread): Likewise.
3043 (store_regs_kernel_thread): Likewise.
3044 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3045 (alphabsd_store_inferior_registers): Likewise.
3046 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3047 (alpha_store_return_value): Likewise.
3048 (alpha_deal_with_atomic_sequence): Likewise.
3049 (alpha_next_pc): Likewise.
3050 (alpha_software_single_step): Likewise.
3051 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3052 (amd64bsd_store_inferior_registers): Likewise.
3053 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3055 (amd64_linux_store_inferior_registers): Likewise.
3056 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3057 (amd64_collect_native_gregset): Likewise.
3058 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3059 (amd64obsd_collect_uthread): Likewise.
3060 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3061 (amd64_collect_fpregset): Likewise.
3062 (amd64_supply_fxsave): Likewise.
3063 (amd64_supply_xsave): Likewise.
3064 (amd64_collect_fxsave): Likewise.
3065 (amd64_collect_xsave): Likewise.
3066 * arc-tdep.c (arc_write_pc): Likewise.
3067 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3068 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3069 (arm_fbsd_store_inferior_registers): Likewise.
3070 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3071 (store_vfp_regs): Likewise.
3072 (arm_linux_fetch_inferior_registers): Likewise.
3073 (arm_linux_store_inferior_registers): Likewise.
3074 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3075 (arm_linux_sigreturn_next_pc): Likewise.
3076 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3077 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3078 (fetch_register): Likewise.
3079 (store_register): Likewise.
3080 * arm-tdep.c (arm_is_thumb): Likewise.
3081 (displaced_in_arm_mode): Likewise.
3082 (bx_write_pc): Likewise.
3083 (arm_get_next_pcs_addr_bits_remove): Likewise.
3084 (arm_software_single_step): Likewise.
3085 (arm_extract_return_value): Likewise.
3086 (arm_store_return_value): Likewise.
3087 (arm_write_pc): Likewise.
3088 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3089 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3090 (bsd_uthread_store_registers): Likewise.
3091 * core-regset.c (fetch_core_registers): Likewise.
3092 * corelow.c (get_core_registers): Likewise.
3093 * cris-tdep.c (cris_store_return_value): Likewise.
3094 (cris_extract_return_value): Likewise.
3095 (find_step_target): Likewise.
3096 (find_step_target): Likewise.
3097 (cris_software_single_step): Likewise.
3098 * ctf.c (ctf_fetch_registers): Likewise.
3099 * darwin-nat.c (cancel_breakpoint): Likewise.
3100 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3101 * frv-tdep.c (frv_extract_return_value): Likewise.
3102 * ft32-tdep.c (ft32_store_return_value): Likewise.
3103 (ft32_extract_return_value): Likewise.
3104 * go32-nat.c (fetch_register): Likewise.
3105 (go32_fetch_registers): Likewise.
3106 (go32_store_registers): Likewise.
3107 (store_register): Likewise.
3108 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3109 (h8300_store_return_value): Likewise.
3110 * hppa-linux-nat.c (fetch_register): Likewise.
3111 (store_register): Likewise.
3112 (hppa_linux_fetch_inferior_registers): Likewise.
3113 (hppa_linux_store_inferior_registers): Likewise.
3114 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3115 (i386_darwin_store_inferior_registers): Likewise.
3116 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3117 (gnu_store_registers): Likewise.
3118 * i386-linux-nat.c (fetch_register): Likewise.
3119 (store_register): Likewise.
3120 (supply_gregset): Likewise.
3121 (fill_gregset): Likewise.
3122 (i386_linux_fetch_inferior_registers): Likewise.
3123 (i386_linux_store_inferior_registers): Likewise.
3124 (i386_linux_resume): Likewise.
3125 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3127 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3128 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3129 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3130 (i386obsd_collect_uthread): Likewise.
3131 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3132 (i386_supply_gregset): Likewise.
3133 (i386_collect_gregset): Likewise.
3134 (i386_supply_fpregset): Likewise.
3135 (i386_collect_fpregset): Likewise.
3136 (i386_mpx_bd_base): Likewise.
3137 * i386-v4-nat.c (supply_fpregset): Likewise.
3138 (fill_fpregset): Likewise.
3139 * i387-tdep.c (i387_supply_fsave): Likewise.
3140 (i387_collect_fsave): Likewise.
3141 (i387_supply_fxsave): Likewise.
3142 (i387_collect_fxsave): Likewise.
3143 (i387_supply_xsave): Likewise.
3144 (i387_collect_xsave): Likewise.
3145 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3146 (ia64_linux_store_registers): Likewise.
3147 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3148 (ia64_extract_return_value): Likewise.
3149 (ia64_store_return_value): Likewise.
3150 (find_func_descr): Likewise.
3151 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3152 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3153 (inf_ptrace_store_registers): Likewise.
3154 * infrun.c (use_displaced_stepping): Likewise.
3155 (displaced_step_prepare_throw): Likewise.
3157 (proceed): Likewise.
3158 (do_target_wait): Likewise.
3159 (adjust_pc_after_break): Likewise.
3160 (handle_inferior_event_1): Likewise.
3161 (handle_signal_stop): Likewise.
3162 (save_infcall_suspend_state): Likewise.
3163 (restore_infcall_suspend_state): Likewise.
3164 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3165 * jit.c (jit_frame_prev_register): Likewise.
3166 * linux-nat.c (save_stop_reason): Likewise.
3167 (linux_nat_wait_1): Likewise.
3168 (resume_stopped_resumed_lwps): Likewise.
3169 * linux-record.c (record_linux_sockaddr): Likewise.
3170 (record_linux_msghdr): Likewise.
3171 (record_linux_system_call): Likewise.
3172 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3173 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3174 (lm32_store_return_value): Likewise.
3175 * m32c-tdep.c (m32c_read_flg): Likewise.
3176 (m32c_pseudo_register_read): Likewise.
3177 (m32c_pseudo_register_write): Likewise.
3178 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3179 (m32r_linux_collect_gregset): Likewise.
3180 * m32r-tdep.c (m32r_store_return_value): Likewise.
3181 (m32r_extract_return_value): Likewise.
3182 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3183 (m68kbsd_collect_fpregset): Likewise.
3184 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3185 * m68k-linux-nat.c (fetch_register): Likewise.
3186 (old_fetch_inferior_registers): Likewise.
3187 (old_store_inferior_registers): Likewise.
3188 (store_regs): Likewise.
3189 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3190 (m68k_svr4_store_return_value): Likewise.
3191 * m88k-tdep.c (m88k_store_arguments): Likewise.
3192 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3193 (mi_cmd_data_write_register_values): Likewise.
3194 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3195 (mips_fbsd_store_inferior_registers): Likewise.
3196 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3197 (mips_fbsd_supply_gregs): Likewise.
3198 (mips_fbsd_collect_fpregs): Likewise.
3199 (mips_fbsd_collect_gregs): Likewise.
3200 (mips_fbsd_supply_fpregset): Likewise.
3201 (mips_fbsd_collect_fpregset): Likewise.
3202 (mips_fbsd_supply_gregset): Likewise.
3203 (mips_fbsd_collect_gregset): Likewise.
3204 * mips-linux-nat.c (supply_gregset): Likewise.
3205 (fill_gregset): Likewise.
3206 (supply_fpregset): Likewise.
3207 (fill_fpregset): Likewise.
3208 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3209 (mips_fill_gregset): Likewise.
3210 (mips_supply_fpregset): Likewise.
3211 (mips_fill_fpregset): Likewise.
3212 (mips64_supply_gregset): Likewise.
3213 (micromips_linux_sigframe_validate): Likewise.
3214 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3215 (mipsnbsd_fetch_inferior_registers): Likewise.
3216 (mipsnbsd_store_inferior_registers): Likewise.
3217 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3218 (mipsnbsd_supply_gregset): Likewise.
3219 (mipsnbsd_iterate_over_regset_sections): Likewise.
3220 (mipsnbsd_supply_reg): Likewise.
3221 (mipsnbsd_supply_fpreg): Likewise.
3222 * mips-tdep.c (mips_in_frame_stub): Likewise.
3223 (mips_dummy_id): Likewise.
3224 (is_octeon_bbit_op): Likewise.
3225 (micromips_bc1_pc): Likewise.
3226 (extended_mips16_next_pc): Likewise.
3227 (mips16_next_pc): Likewise.
3228 (deal_with_atomic_sequence): Likewise.
3229 * moxie-tdep.c (moxie_process_readu): Likewise.
3230 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3231 * nto-procfs.c (procfs_store_registers): Likewise.
3232 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3233 (ppcfbsd_store_inferior_registers): Likewise.
3234 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3235 (fetch_altivec_register): Likewise.
3236 (get_spe_registers): Likewise.
3237 (fetch_spe_register): Likewise.
3238 (fetch_altivec_registers): Likewise.
3239 (fetch_all_gp_regs): Likewise.
3240 (fetch_all_fp_regs): Likewise.
3241 (store_vsx_register): Likewise.
3242 (store_altivec_register): Likewise.
3243 (set_spe_registers): Likewise.
3244 (store_spe_register): Likewise.
3245 (store_altivec_registers): Likewise.
3246 (store_all_gp_regs): Likewise.
3247 (store_all_fp_regs): Likewise.
3248 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3249 (ppc_linux_collect_gregset): Likewise.
3250 (ppc_canonicalize_syscall): Likewise.
3251 (ppc_linux_record_signal): Likewise.
3252 (ppu2spu_prev_register): Likewise.
3253 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3254 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3255 (ppcobsd_store_registers): Likewise.
3256 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3258 (ppc_ravenscar_generic_store_registers): Likewise.
3259 * procfs.c (procfs_fetch_registers): Likewise.
3260 (procfs_store_registers): Likewise.
3261 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3262 (ravenscar_store_registers): Likewise.
3263 (ravenscar_prepare_to_store): Likewise.
3264 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3265 * record-full.c (record_full_wait_1): Likewise.
3266 (record_full_registers_change): Likewise.
3267 (record_full_store_registers): Likewise.
3268 (record_full_core_fetch_registers): Likewise.
3269 (record_full_save): Likewise.
3270 (record_full_goto_insn): Likewise.
3271 * regcache.c (regcache_register_size): Likewise.
3272 (get_regcache_arch): Remove.
3273 (regcache_read_pc): Likewise.
3274 * regcache.h (get_regcache_arch): Remove.
3275 * remote-sim.c (gdbsim_fetch_register): Likewise.
3276 (gdbsim_store_register): Likewise.
3277 * remote.c (fetch_register_using_p): Likewise.
3278 (send_g_packet): Likewise.
3279 (remote_prepare_to_store): Likewise.
3280 (store_registers_using_G): Likewise.
3281 * reverse.c (save_bookmark_command): Likewise.
3282 (goto_bookmark_command): Likewise.
3283 * rs6000-aix-tdep.c (branch_dest): Likewise.
3284 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3285 (fetch_register): Likewise.
3286 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3287 (ppc_collect_reg): Likewise.
3288 (ppc_collect_gregset): Likewise.
3289 (ppc_collect_fpregset): Likewise.
3290 (ppc_collect_vsxregset): Likewise.
3291 (ppc_collect_vrregset): Likewise.
3292 (ppc_displaced_step_hw_singlestep): Likewise.
3293 (rs6000_pseudo_register_read): Likewise.
3294 (rs6000_pseudo_register_write): Likewise.
3295 * s390-linux-nat.c (supply_gregset): Likewise.
3296 (fill_gregset): Likewise.
3297 (s390_linux_fetch_inferior_registers): Likewise.
3298 * s390-linux-tdep.c (s390_write_pc): Likewise.
3299 (s390_software_single_step): Likewise.
3300 (s390_all_but_pc_registers_record): Likewise.
3301 (s390_linux_syscall_record): Likewise.
3302 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3303 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3304 (shnbsd_store_inferior_registers): Likewise.
3305 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3306 (sh_extract_return_value_fpu): Likewise.
3307 (sh_store_return_value_nofpu): Likewise.
3308 (sh_corefile_supply_regset): Likewise.
3309 (sh_corefile_collect_regset): Likewise.
3310 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3311 (sh64_store_return_value): Likewise.
3312 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3313 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3314 (sparc_store_inferior_registers): Likewise.
3315 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3316 (sparc_ravenscar_prepare_to_store): Likewise.
3317 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3318 (sparc_analyze_control_transfer): Likewise.
3319 (sparc_step_trap): Likewise.
3320 (sparc_software_single_step): Likewise.
3321 (sparc32_gdbarch_init): Likewise.
3322 (sparc_supply_rwindow): Likewise.
3323 (sparc_collect_rwindow): Likewise.
3324 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3325 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3326 (sparc64nbsd_collect_gregset): Likewise.
3327 (sparc64nbsd_supply_fpregset): Likewise.
3328 (sparc64nbsd_collect_fpregset): Likewise.
3329 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3330 (sparc64_supply_gregset): Likewise.
3331 (sparc64_collect_gregset): Likewise.
3332 (sparc64_supply_fpregset): Likewise.
3333 (sparc64_collect_fpregset): Likewise.
3334 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3335 * spu-tdep.c (spu_unwind_sp): Likewise.
3336 (spu2ppu_prev_register): Likewise.
3337 (spu_memory_remove_breakpoint): Likewise.
3338 * stack.c (return_command): Likewise.
3339 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3340 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3341 * tracefile.c (trace_save_ctf): Likewise.
3342 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3343 (do_windows_store_inferior_registers): Likewise.
3344 (windows_resume): Likewise.
3345 * xtensa-linux-nat.c (fill_gregset): Likewise.
3346 (supply_gregset_reg): Likewise.
3347 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3348 (xtensa_register_read_masked): Likewise.
3349 (xtensa_supply_gregset): Likewise.
3350 (xtensa_extract_return_value): Likewise.
3351 (xtensa_store_return_value): Likewise.
3353 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3355 * doublest.c (floatformat_from_string): New function.
3356 * doublest.h (floatformat_from_string): Add prototype.
3358 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3359 (OP_FLOAT): ... this.
3360 * expression.h: Do not include "doublest.h".
3361 (union exp_element): Replace doubleconst and decfloatconst by
3362 new element floatconst.
3363 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3364 (ada_evaluate_subexp): Likewise.
3365 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3366 OP_DOUBLE and OP_DECFLOAT.
3367 * expprint.c (print_subexp_standard): Likewise.
3368 (dump_subexp_body_standard): Likewise.
3369 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3371 * parse.c: Include "dfp.h".
3372 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3373 (write_exp_elt_floatcst): New function.
3374 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3376 (operator_check_standard): Likewise.
3377 (parse_float): Do not accept suffix. Take type as input. Return bool.
3378 Return target format buffer instead of host DOUBLEST.
3379 Use floatformat_from_string and decimal_from_string to parse
3380 either binary or decimal floating-point types.
3381 (parse_c_float): Remove.
3382 * parser-defs.h: Do not include "doublest.h".
3383 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3384 (write_exp_elt_floatcst): Add prototype.
3385 (parse_float): Update prototype.
3386 (parse_c_float): Remove.
3388 * c-exp.y: Do not include "dfp.h".
3389 (typed_val_float): Use byte buffer instead of DOUBLEST.
3390 (typed_val_decfloat): Remove.
3392 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3393 (parse_number): Update to new parse_float interface.
3394 Parse suffixes and determine type before calling parse_float.
3395 Handle decimal and binary FP types the same way.
3397 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3398 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
3399 (parse_number): Update to new parse_float interface.
3400 Parse suffixes and determine type before calling parse_float.
3402 * f-exp.y: Replace dval by typed_val_float.
3403 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3404 (parse_number): Use parse_float instead of atof.
3406 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3407 (parse_go_float): Remove.
3408 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3409 (parse_number): Call parse_float instead of parse_go_float.
3410 Parse suffixes and determine type before calling parse_float.
3412 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3413 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3414 (parse_number): Update to new parse_float interface.
3415 Parse suffixes and determine type before calling parse_float.
3417 * m2-exp.y: Replace dval by byte buffer val.
3418 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3419 (parse_number): Call parse_float instead of atof.
3421 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
3422 (lex_number): Call parse_float instead of strtod.
3423 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
3424 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
3425 Use write_exp_elt_floatcst.
3426 (unit_testing): Remove static variable.
3427 (rust_type): Do not check unit_testing.
3428 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
3430 * ada-exp.y (type_float, type_double): Remove.
3431 (typed_val_float): Use byte buffer instead of DOUBLEST.
3432 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3433 * ada-lex.l (processReal): Use parse_float instead of sscanf.
3435 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3437 * aarch64-tdep.h (enum aarch64_regnum): Remove.
3438 * arch/aarch64.h: New file.
3440 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3442 * dfp.h (decimal_from_string): Use const reference for argument.
3443 * dfp.c (decimal_from_string): Likewise.
3445 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3447 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
3448 * sh64-tdep.c (sh64_do_fp_register): Likewise.
3449 * mips-tdep.c (mips_print_fp_register): Likewise.
3451 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3453 * common/format.h (enum argclass): Replace decfloat_arg by
3454 dec32float_arg, dec64float_arg, and dec128float_arg.
3455 * common/format.c (parse_format_string): Update to return
3456 new decimal float argument classes.
3458 * printcmd.c (printf_decfloat): Rename to ...
3459 (printf_floating): ... this. Add argclass argument, and use it
3460 instead of parsing the format string again. Add support for
3461 binary floating-point values, using floatformat_to_string.
3462 Convert value to the target format if it doesn't already match.
3463 (ui_printf): Call printf_floating instead of printf_decfloat,
3464 also for double_arg / long_double_arg. Pass argclass.
3466 * dfp.c (decimal_to_string): Add format string argument.
3467 * dfp.h (decimal_to_string): Likewise.
3469 * doublest.c (floatformat_to_string): Add format string argument.
3470 * doublest.h (floatformat_to_string): Likewise.
3472 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3474 * doublest.c (floatformat_precision): New routine.
3475 (floatformat_to_string): Likewise.
3476 * doublest.c (floatformat_to_string): Add prototype.
3478 * printcmd.c (print_scalar_formatted): Only call print_floating
3479 on floating-point types.
3480 * valprint.c: Do not include "floatformat.h".
3481 (generic_val_print_decfloat): Remove.
3482 (generic_val_print): Call generic_val_print_float for both
3483 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
3484 (print_floating): Use floatformat_to_string. Handle decimal float.
3485 (print_decimal_floating): Remove, merge into floatformat_to_string.
3486 * value.h (print_decimal_floating): Remove.
3488 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
3490 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
3492 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
3494 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3496 * memattr.h: Don't include vec.h.
3497 (struct mem_attrib): Initialize fields.
3498 <unknown>: New static method.
3499 (struct mem_region): Add constructors, operator<, initialize
3501 * memattr.c: Include algorithm.
3502 (default_mem_attrib, unknown_mem_attrib): Remove.
3503 (user_mem_region_list): New global.
3504 (target_mem_region_list, mem_region_list): Change type to
3505 std::vector<mem_region>.
3506 (mem_use_target): Now a function.
3507 (target_mem_regions_valid): Change type to bool.
3508 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
3509 (require_user_regions): Adjust.
3510 (require_target_regions): Adjust.
3511 (create_mem_region): Adjust.
3512 (lookup_mem_region): Adjust.
3513 (invalidate_target_mem_regions): Adjust.
3514 (mem_clear): Rename to...
3515 (user_mem_clear): ... this, and adjust.
3516 (mem_command): Adjust.
3517 (info_mem_command): Adjust.
3518 (mem_enable, enable_mem_command, mem_disable,
3519 disable_mem_command): Adjust.
3520 (mem_delete): Adjust.
3521 (delete_mem_command): Adjust.
3522 * memory-map.h (parse_memory_map): Return an std::vector.
3523 * memory-map.c (parse_memory_map): Likewise.
3524 (struct memory_map_parsing_data): Add constructor.
3525 <memory_map>: Point to std::vector.
3526 (memory_map_start_memory): Adjust.
3527 (memory_map_end_memory): Adjust.
3528 (memory_map_end_property): Adjust.
3529 (clear_result): Remove.
3530 * remote.c (remote_memory_map): Return an std::vector.
3531 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
3533 (target_debug_print_mem_region_vector): New.
3534 * target-delegates.c: Regenerate.
3535 * target.h (mem_region_vector): New typedef.
3536 (to_memory_map): Return mem_region_vector.
3537 (target_memory_map): Return an std::vector.
3538 * target.c (target_memory_map): Return an std::vector.
3539 (flash_erase_command): Adjust.
3541 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3543 * memory-map.c (struct memory_map_parsing_data) <property_name>:
3544 Change type to std::string.
3545 (memory_map_start_property): Adjust.
3546 (memory_map_end_property): Adjust.
3548 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3550 * infrun.h: Include common/byte-vector.h.
3551 (struct displaced_step_closure): New struct.
3552 (struct buf_displaced_step_closure): New struct.
3553 * infrun.c (displaced_step_closure::~displaced_step_closure):
3554 Provide default implementation.
3555 (displaced_step_clear): Deallocate step closure with delete.
3556 * aarch64-tdep.c (displaced_step_closure): Rename to ...
3557 (aarch64_displaced_step_closure): ... this, extend
3558 displaced_step_closure.
3559 (aarch64_displaced_step_data) <dsc>: Change type to
3560 aarch64_displaced_step_closure.
3561 (aarch64_displaced_step_copy_insn): Adjust to type change, use
3563 (aarch64_displaced_step_fixup): Add cast for displaced step
3565 * amd64-tdep.c (displaced_step_closure): Rename to ...
3566 (amd64_displaced_step_closure): ... this, extend
3567 displaced_step_closure.
3568 <insn_buf>: Change type to std::vector<gdb_byte>.
3570 (fixup_riprel): Change type of DSC parameter, adjust to type
3572 (fixup_displaced_copy): Change type of DSC parameter.
3573 (amd64_displaced_step_copy_insn): Instantiate
3574 amd64_displaced_step_closure.
3575 (amd64_displaced_step_fixup): Add cast for closure type, adjust
3576 to type change of insn_buf.
3577 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
3579 (arm_linux_copy_svc): Likewise.
3580 (cleanup_kernel_helper_return): Likewise.
3581 (arm_catch_kernel_helper_return): Likewise.
3582 (arm_linux_displaced_step_copy_insn): Instantiate
3583 arm_displaced_step_closure.
3584 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
3585 (displaced_read_reg): Change type of parameter DSC.
3586 (branch_write_pc): Likewise.
3587 (load_write_pc): Likewise.
3588 (alu_write_pc): Likewise.
3589 (displaced_write_reg): Likewise.
3590 (arm_copy_unmodified): Likewise.
3591 (thumb_copy_unmodified_32bit): Likewise.
3592 (thumb_copy_unmodified_16bit): Likewise.
3593 (cleanup_preload): Likewise.
3594 (install_preload): Likewise.
3595 (arm_copy_preload): Likewise.
3596 (thumb2_copy_preload): Likewise.
3597 (install_preload_reg): Likewise.
3598 (arm_copy_preload_reg): Likewise.
3599 (cleanup_copro_load_store): Likewise.
3600 (install_copro_load_store): Likewise.
3601 (arm_copy_copro_load_store) Likewise.
3602 (thumb2_copy_copro_load_store): Likewise.
3603 (cleanup_branch): Likewise.
3604 (install_b_bl_blx): Likewise.
3605 (arm_copy_b_bl_blx): Likewise.
3606 (thumb2_copy_b_bl_blx): Likewise.
3607 (thumb_copy_b): Likewise.
3608 (install_bx_blx_reg): Likewise.
3609 (arm_copy_bx_blx_reg): Likewise.
3610 (thumb_copy_bx_blx_reg): Likewise.
3611 (cleanup_alu_imm): Likewise.
3612 (arm_copy_alu_imm): Likewise.
3613 (thumb2_copy_alu_imm): Likewise.
3614 (cleanup_alu_reg): Likewise.
3615 (install_alu_reg): Likewise.
3616 (arm_copy_alu_reg): Likewise.
3617 (thumb_copy_alu_reg): Likewise.
3618 (cleanup_alu_shifted_reg): Likewise.
3619 (install_alu_shifted_reg): Likewise.
3620 (arm_copy_alu_shifted_reg): Likewise.
3621 (cleanup_load): Likewise.
3622 (cleanup_store): Likewise.
3623 (arm_copy_extra_ld_st): Likewise.
3624 (install_load_store): Likewise.
3625 (thumb2_copy_load_literal): Likewise.
3626 (thumb2_copy_load_reg_imm): Likewise.
3627 (arm_copy_ldr_str_ldrb_strb): Likewise.
3628 (cleanup_block_load_all): Likewise.
3629 (cleanup_block_store_pc): Likewise.
3630 (cleanup_block_load_pc): Likewise.
3631 (arm_copy_block_xfer): Likewise.
3632 (thumb2_copy_block_xfer): Likewise.
3633 (cleanup_svc): Likewise.
3634 (install_svc): Likewise.
3635 (arm_copy_svc): Likewise.
3636 (thumb_copy_svc): Likewise.
3637 (arm_copy_undef): Likewise.
3638 (thumb_32bit_copy_undef): Likewise.
3639 (arm_copy_unpred): Likewise.
3640 (arm_decode_misc_memhint_neon): Likewise.
3641 (arm_decode_unconditional): Likewise.
3642 (arm_decode_miscellaneous): Likewise.
3643 (arm_decode_dp_misc): Likewise.
3644 (arm_decode_ld_st_word_ubyte): Likewise.
3645 (arm_decode_media): Likewise.
3646 (arm_decode_b_bl_ldmstm): Likewise.
3647 (arm_decode_ext_reg_ld_st): Likewise.
3648 (thumb2_decode_dp_shift_reg): Likewise.
3649 (thumb2_decode_ext_reg_ld_st): Likewise.
3650 (arm_decode_svc_copro): Likewise.
3651 (thumb2_decode_svc_copro): Likewise.
3652 (install_pc_relative): Likewise.
3653 (thumb_copy_pc_relative_16bit): Likewise.
3654 (thumb_decode_pc_relative_16bit): Likewise.
3655 (thumb_copy_pc_relative_32bit): Likewise.
3656 (thumb_copy_16bit_ldr_literal): Likewise.
3657 (thumb_copy_cbnz_cbz): Likewise.
3658 (thumb2_copy_table_branch): Likewise.
3659 (cleanup_pop_pc_16bit_all): Likewise.
3660 (thumb_copy_pop_pc_16bit): Likewise.
3661 (thumb_process_displaced_16bit_insn): Likewise.
3662 (decode_thumb_32bit_ld_mem_hints): Likewise.
3663 (thumb_process_displaced_32bit_insn): Likewise.
3664 (thumb_process_displaced_insn): Likewise.
3665 (arm_process_displaced_insn): Likewise.
3666 (arm_displaced_init_closure): Likewise.
3667 (arm_displaced_step_fixup): Add cast for closure.
3668 * arm-tdep.h: Include infrun.h.
3669 (displaced_step_closure): Rename to ...
3670 (arm_displaced_step_closure): ... this, extend
3671 displaced_step_closure.
3672 <u::svc::copy_svc_os>: Change type of parameter DSC.
3673 <cleanup>: Likewise.
3674 (arm_process_displaced_insn): Likewise.
3675 (arm_displaced_init_closure): Likewise.
3676 (displaced_read_reg): Likewise.
3677 (displaced_write_reg): Likewise.
3678 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
3680 * i386-tdep.h: Include infrun.h.
3681 (i386_displaced_step_closure): New typedef.
3682 * i386-tdep.c (i386_displaced_step_copy_insn): Use
3683 i386_displaced_step_closure.
3684 (i386_displaced_step_fixup): Adjust.
3685 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
3686 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
3688 (ppc_displaced_step_fixup): Adjust.
3689 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
3690 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
3692 (s390_displaced_step_fixup): Adjust.
3694 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
3696 * interps.h (interp_resume, interp_suspend, interp_set_temp):
3697 Remove declarations.
3699 2017-10-20 Tom Tromey <tom@tromey.com>
3701 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
3703 (gdb_bfd_record_inclusion): Update.
3704 (bfdp): Remove typedef.
3706 2017-10-20 Tom Tromey <tom@tromey.com>
3708 * gdb_bfd.c (gdb_bfd_ref): Use new.
3709 (struct gdb_bfd_data): Add constructor, destructor, and member
3711 (gdb_bfd_unref): Use delete.
3713 2017-10-20 Tom Tromey <tom@tromey.com>
3715 * exec.c (exec_file_attach): Use new_bfd_ref.
3716 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
3717 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3718 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
3720 * gdb_bfd.h (new_bfd_ref): New function.
3722 2017-10-20 Pedro Alves <palves@redhat.com>
3724 * main.c (captured_command_loop): Add attribute noinline.
3726 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
3728 * interps.c (struct interp_factory): Add constructor.
3729 (interp_factory_p): Remove typedef.
3730 (DEF_VEC_P(interp_factory_p)): Remove.
3731 (interpreter_factories): Change type to std::vector.
3732 (interp_factory_register): Adjust.
3733 (interp_lookup): Adjust.
3734 (interpreter_completer): Adjust.
3736 2017-10-19 Tom Tromey <tom@tromey.com>
3738 * break-catch-syscall.c (catch_syscall_completer): Use
3739 std::string, gdb::unique_xmalloc_ptr.
3741 2017-10-19 Tom Tromey <tom@tromey.com>
3743 * infcall.c (call_function_by_hand_dummy): Use std::string.
3745 2017-10-19 Tom Tromey <tom@tromey.com>
3747 * mi/mi-main.c (mi_cmd_execute): Update.
3748 * top.h (prepare_execute_command): Return scoped_value_mark.
3749 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
3750 Add move constructor.
3751 * top.c (prepare_execute_command): Return scoped_value_mark.
3752 (execute_command): Update.
3754 2017-10-19 Pedro Alves <palves@redhat.com>
3756 * xml-support.c (xml_fetch_content_from_file): Check fread's
3759 2017-10-19 Pedro Alves <palves@redhat.com>
3761 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
3763 (handle_error_fd): New function.
3764 (ser_base_async): Add/delete an event loop file handler for
3767 2017-10-19 Pedro Alves <palves@redhat.com>
3769 * xml-support.c (xml_fetch_content_from_file): Don't read in
3770 chunks. Instead use fseek to determine the file's size, and read
3773 2017-11-18 Keith Seitz <keiths@redhat.com>
3775 * c-exp.y (oper): Canonicalize conversion operators of user-defined
3777 Add whitespace to front of type name.
3779 2017-10-18 Keith Seitz <keiths@redhat.com>
3781 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
3782 DW_AT_accessibility.
3784 2017-10-18 Yao Qi <yao.qi@linaro.org>
3786 * features/tic6x-c62x-linux.c: Remove.
3788 2017-10-17 Tom Tromey <tom@tromey.com>
3790 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
3791 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
3792 (do_mixed_source_and_assembly): Likewise.
3794 2017-10-17 Tom Tromey <tom@tromey.com>
3796 * regcache.c (regcache::xfer_part): Remove assertion.
3798 2017-10-17 Pedro Alves <palves@redhat.com>
3800 * xml-support.c (xml_fetch_content_from_file): Call
3801 unique_ptr::release() instead unique_ptr::get() when passing
3804 2017-10-17 Yao Qi <yao.qi@linaro.org>
3806 * regcache.c (regcache::xfer_part): Remove parameters read and
3807 write, add parameter is_raw. All callers are updated.
3809 2017-10-16 Keith Seitz <keiths@redhat.com>
3811 * c-typeprint.c (enum access_specifier): Moved here from
3813 (output_access_specifier): New function.
3814 (c_type_print_base): Consider typedefs when assessing
3815 whether access labels are needed.
3816 Use output_access_specifier as needed.
3817 Output access specifier for typedefs, if needed.
3818 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
3819 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
3821 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
3824 2017-10-16 Tom Tromey <tom@tromey.com>
3826 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
3827 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
3828 * target.c (target_fileio_read_stralloc): Update.
3829 * sparc64-tdep.c (adi_is_addr_mapped): Update.
3830 * target.h (target_fileio_read_stralloc): Return
3833 2017-10-16 Tom Tromey <tom@tromey.com>
3835 * xml-syscall.c (xml_init_syscalls_info): Update.
3836 * xml-support.c (xinclude_start_include): Update.
3837 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
3838 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
3839 (xml_fetch_content_from_file): Likewise.
3840 * osdata.c (get_osdata): Update.
3841 * target.h (target_read_stralloc, target_get_osdata): Return
3843 * solib-aix.c (solib_aix_get_library_list): Update.
3844 * solib-target.c (solib_target_current_sos): Update.
3845 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
3846 * xml-tdesc.c (fetch_available_features_from_target): Update.
3847 (target_fetch_description_xml): Update.
3848 (file_read_description_xml): Update.
3849 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
3850 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
3851 (remote_pid_to_exec_file): Update.
3852 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
3853 (target_get_osdata): Likewise.
3855 2017-10-16 Tom Tromey <tom@tromey.com>
3857 * remote.c (remote_register_number_and_offset): Use std::vector.
3858 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
3859 (putpkt_binary): Use gdb::def_vector.
3860 (compare_sections_command): Use gdb::byte_vector.
3862 2017-10-16 Tom Tromey <tom@tromey.com>
3864 * ppc-linux-nat.c (hwdebug_insert_point): Use
3865 gdb::unique_xmalloc_ptr, XDUP.
3867 2017-10-16 Tom Tromey <tom@tromey.com>
3869 * probe.c (parse_probes): Use std::string.
3870 (info_probes_for_ops, enable_probes_command)
3871 (disable_probes_command): Remove cleanups.
3873 2017-10-16 Tom Tromey <tom@tromey.com>
3875 * buildsym.c (block_compar): Remove.
3876 (end_symtab_get_static_block): Use std::vector.
3878 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
3880 * memrange.h (struct mem_range): Define operator< and operator==.
3881 (mem_range_s): Remove.
3882 (DEF_VEC_O (mem_range_s)): Remove.
3883 (normalize_mem_ranges): Change parameter type to std::vector.
3884 * memrange.c (compare_mem_ranges): Remove.
3885 (normalize_mem_ranges): Change parameter type to std::vector,
3886 adjust to vector change.
3887 * exec.c (section_table_available_memory): Return vector, remove
3889 (section_table_read_available_memory): Adjust to std::vector
3891 * remote.c (remote_read_bytes): Adjust to std::vector
3893 * tracepoint.h (traceframe_available_memory): Change parameter
3894 type to std::vector.
3895 * tracepoint.c (traceframe_available_memory): Change parameter
3896 type to std::vector, adjust.
3897 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
3899 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3900 unittests/memrange-selftests.c.
3901 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
3902 * gdb/unittests/memrange-selftests.c: New file.
3904 2017-10-16 Pedro Alves <palves@redhat.com>
3906 * elfread.c (probe_key_free): Rename range-for variable.
3907 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
3908 (find_probe_by_pc, collect_probes): Rename range-for variable.
3910 2017-10-16 Yao Qi <yao.qi@linaro.org>
3912 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
3913 * features/tic6x-c62x.c: Remove.
3914 * features/tic6x-c64x-linux.c: Remove.
3915 * features/tic6x-c64x.c: Remove.
3916 * features/tic6x-c64xp-linux.c: Remove.
3917 * features/tic6x-c64xp.c: Remove.
3918 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
3919 initialize_tdesc_tic6x_*_linux functions.
3920 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
3921 initialize_tdesc_tic6x_* functions.
3923 2017-10-16 Yao Qi <yao.qi@linaro.org>
3925 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
3927 * regformats/tic6x-c62x.dat: Remove.
3928 * regformats/tic6x-c64x.dat: Remove.
3929 * regformats/tic6x-c64xp.dat: Remove.
3931 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
3933 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
3934 (the !HAVE_LIBEXPAT version).
3936 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
3938 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
3941 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3943 * target.h: Include tracepoint.h.
3944 (enum trace_find_type): Move to tracepoint.h.
3945 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
3946 * tracepoint.h: Don't include target.h
3947 (enum trace_find_type): Move from target.h.
3948 (parse_traceframe_info): Return a unique ptr.
3949 * tracepoint.c (current_traceframe_info): Change type to unique
3951 (free_traceframe_info): Remove.
3952 (clear_traceframe_info): Don't manually free
3953 current_traceframe_info.
3954 (free_result): Remove.
3955 (parse_traceframe_info): Return a unique ptr.
3956 (get_traceframe_info): Adjust to unique ptr.
3957 * ctf.c (ctf_traceframe_info): Return a unique ptr.
3958 * remote.c (remote_traceframe_info): Return a unique ptr.
3959 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
3961 * target-debug.h (target_debug_print_traceframe_info_up): New
3963 * target-delegates.c: Regenerate.
3965 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3967 * memrange.h (struct mem_range): Add constructors.
3968 * tracepoint.h (struct traceframe_info) <memory>: Change type to
3969 std::vector<mem_range>.
3970 * tracepoint.c (free_traceframe_info): Don't manually free
3972 (traceframe_info_start_memory): Adjust to vector change.
3973 (traceframe_available_memory): Likewise.
3974 * tracefile-tfile.c (build_traceframe_info): Likewise.
3975 * ctf.c (ctf_traceframe_info): Likewise.
3977 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3979 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
3981 * tracepoint.c (free_traceframe_info): Deallocate with delete.
3982 (traceframe_info_start_tvar): Adjust to vector change.
3983 (parse_traceframe_info): Allocate with new.
3984 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
3986 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
3988 tfile_traceframe_info): Allocate with new.
3989 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
3992 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3994 * tracepoint.c (traceframe_info): Rename to...
3995 (current_traceframe_info): ...this.
3996 (clear_traceframe_info): Adjust.
3997 (get_traceframe_info): Adjust.
3999 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4001 * nat/linux-osdata.c: Include algorithm.
4002 (compare_processes): Remove.
4003 (struct pid_pgid_entry): New struct.
4004 (linux_xfer_osdata_processgroups): Use std::vector instead of
4007 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4009 * objfiles.h: Don't include symfile.h.
4010 (struct partial_symbol): Remove forward-declaration.
4011 (struct objfile) <global_psymbols, static_psymbols>: Change type
4012 to std::vector<partial_symbol *>.
4013 * objfiles.c (objfile::objfile): Don't memset those fields.
4014 (objfile::~objfile): Don't free those fields.
4015 * psympriv.h (struct psymbol_allocation_list): Remove
4016 forward-declaration.
4017 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4019 (start_psymtab_common): Change parameters to std::vector.
4020 * psymtab.c: Include algorithm.
4021 (require_partial_symbols): Call shrink_to_fit.
4022 (find_pc_sect_psymbol): Adjust to vector change.
4023 (match_partial_symbol): Likewise.
4024 (lookup_partial_symbol): Likewise.
4025 (psym_relocate): Likewise.
4026 (dump_psymtab): Likewise.
4027 (recursively_search_psymtabs): Likewise.
4028 (compare_psymbols): Remove.
4029 (sort_pst_symbols): Adjust to vector change.
4030 (start_psymtab_common): Likewise.
4031 (end_psymtab_common): Likewise.
4032 (psymbol_bcache_full): De-constify return value.
4033 (add_psymbol_to_bcache): Likewise.
4034 (extend_psymbol_list): Remove.
4035 (append_psymbol_to_list): Adjust to vector change.
4036 (add_psymbol_to_list): Likewise.
4037 (init_psymbol_list): Likewise.
4038 (maintenance_info_psymtabs): Likewise.
4039 (maintenance_check_psymtabs): Likewise.
4040 * symfile.h (struct psymbol_allocation_list): Remove.
4041 * symfile.c (reread_symbols): Adjust to vector change.
4042 * dbxread.c (start_psymtab): Change type of parameters.
4043 (dbx_symfile_read): Adjust to vector change.
4044 (read_dbx_symtab): Likewise.
4045 (start_psymtab): Change type of parameters.
4046 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4047 (create_partial_symtab): Likewise.
4048 (add_partial_symbol): Likewise.
4049 (write_one_signatured_type): Likewise.
4050 (recursively_write_psymbols): Likewise.
4051 * mdebugread.c (parse_partial_symbols): Likewise.
4052 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4053 (scan_xcoff_symtab): Adjust to vector change.
4054 (xcoff_initial_scan): Likewise.
4056 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4058 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4060 2017-10-13 Yao Qi <yao.qi@linaro.org>
4062 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4063 Remove s390x-*-expedite, add s390x-expedite.
4065 2017-10-13 Yao Qi <yao.qi@linaro.org>
4067 * features/s390-gs-linux64.c: Regenerated.
4068 * features/s390x-gs-linux64.c: Regenerated.
4070 2017-10-13 Tom Tromey <tom@tromey.com>
4072 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4073 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4075 * symfile.c (symbol_file_add_with_addrs): Use new.
4076 (symbol_file_add_separate): Update comment.
4077 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4078 * jit.c (jit_object_close_impl): Use new.
4079 (jit_unregister_code): Use delete.
4080 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4081 (~objfile): Rename from free_objfile.
4082 (free_objfile_separate_debug, do_free_objfile_cleanup)
4083 (free_all_objfiles, objfile_purge_solibs): Use delete.
4084 * objfiles.h (struct objfile): Add constructor and destructor.
4085 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4086 (allocate_objfile, free_objfile): Don't declare.
4087 (struct objstats): Add initializers.
4089 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4091 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4092 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4093 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4094 * gdbarch.h: Regenerate.
4095 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4097 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4098 (i386_displaced_step_fixup): Adjust comment.
4099 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4101 2017-10-12 Tom Tromey <tom@tromey.com>
4103 * prologue-value.h (pv_area::store_would_trash): Return bool.
4104 (pv_area::find_reg): Likewise.
4105 * prologue-value.c (pv_area::store_would_trash): Return bool.
4106 (pv_area::find_reg): Likewise.
4108 2017-10-12 Tom Tromey <tom@tromey.com>
4110 * s390-linux-tdep.c (s390_store, s390_load)
4111 (s390_check_for_saved, s390_analyze_prologue): Update.
4112 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4113 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4114 * prologue-value.h (class pv_area): Move from prologue-value.c.
4115 Change names of members. Add constructor, destructor, member
4117 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4118 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4119 (pv_area_fetch, pv_area_scan): Don't declare.
4120 * prologue-value.c (struct pv_area::area_entry): Now member of
4122 (struct pv_area): Move to prologue-value.h.
4123 (pv_area::pv_area): Rename from make_pv_area.
4124 (pv_area::~pv_area): Rename from free_pv_area.
4125 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4126 (clear_entries, find_entry, overlaps, store_would_trash, store)
4127 (fetch, find_reg, scan): Now member of pv_area.
4128 Remove "area" argument. Update.
4129 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4131 * mn10300-tdep.c (push_reg, check_for_saved)
4132 (mn10300_analyze_prologue): Update.
4133 * mep-tdep.c (is_arg_spill, check_for_saved)
4134 (mep_analyze_prologue): Update.
4135 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4136 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4137 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4138 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4140 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4141 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4143 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4145 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4146 * linux-nat.c (linux_nat_delete_thread): New variable.
4147 (lwp_free): Invoke linux_nat_delete_thread if set.
4148 (linux_nat_set_delete_thread): New function.
4149 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4150 thread delete callback.
4151 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4152 (_initialize_arm_linux_nat): Assign thread delete callback.
4153 * s390-linux-nat.c (s390_delete_thread): New function.
4154 (_initialize_s390_nat): Assign thread delete callback.
4155 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4156 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4158 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4160 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4161 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4163 2017-10-09 Tom Tromey <tom@tromey.com>
4165 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4167 * tui/tui-layout.c (enum tui_status): Use std::string.
4169 2017-10-11 Tom Tromey <tom@tromey.com>
4171 * gdbthread.h (thread_command): Constify.
4172 * inferior.h (detach_command): Constify.
4173 * top.h (set_history, show_history): Constify.
4174 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4175 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4176 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4177 * printcmd.c (set_command): Constify.
4178 (non_const_set_command): New function.
4179 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4180 * breakpoint.c (enable_command, disable_command, delete_command)
4181 (catch_command, tcatch_command, set_breakpoint_cmd)
4182 (show_breakpoint_cmd): Constify.
4183 * macrocmd.c (macro_command): Constify.
4184 * infcmd.c (unset_command, kill_command, detach_command)
4185 (info_proc_cmd): Constify.
4186 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4187 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4188 (info_auto_load_cmd): Constify.
4189 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4190 (unset_tdesc_cmd): Constify.
4191 * ada-lang.c (set_ada_command, show_ada_command)
4192 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4193 * guile/guile.c (set_guile_command, show_guile_command)
4194 (info_guile_command): Constify.
4195 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4197 * skip.c (skip_command): Constify.
4198 * compile/compile.c (_initialize_compile): Constify.
4199 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4200 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4201 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4202 (maint_btrace_pt_show_cmd): Constify.
4203 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4205 * python/python.c (user_show_python, user_set_python): Constify.
4206 * mips-tdep.c (set_mips_command, show_mips_command)
4207 (set_mipsfpu_command): Constify.
4208 * record-btrace.c (cmd_record_btrace_start)
4209 (cmd_set_record_btrace, cmd_show_record_btrace)
4210 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4211 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4212 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4214 * symfile.c (overlay_command): Constify.
4215 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4216 * cli/cli-logging.c (set_logging_command, show_logging_command):
4218 * cli/cli-dump.c (dump_command, append_command)
4219 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4220 (tekhex_dump_command, binary_dump_command)
4221 (binary_append_command): Constify.
4222 * cli/cli-decode.c (struct cmd_list_element): Change type of
4224 * cli/cli-cmds.c (info_command, show_command, set_debug)
4225 (show_debug): Constify.
4226 (show_command): Add non-const overload.
4227 * top.c (set_history, show_history): Constify.
4228 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4229 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4230 * target.c (target_command): Constify.
4231 * sparc64-tdep.c (info_adi_command): Constify.
4232 * record-full.c (cmd_record_full_start): Constify.
4233 (set_record_full_command): Constify. Fix typo.
4234 (show_record_full_command): Constify.
4235 * thread.c (thread_command, thread_apply_command): Constify.
4236 * memattr.c (dummy_cmd): Constify.
4237 * value.c (function_command): Constify.
4238 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4239 * probe.c (info_probes_command): Constify.
4240 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4241 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4242 (show_thread_cmd, set_thread_default_cmd)
4243 (show_thread_default_cmd): Constify.
4244 (check_empty): Constify.
4245 * tracepoint.c (tfind_command): Constify.
4246 * cp-support.c (maint_cplus_command): Constify.
4247 * windows-tdep.c (info_w32_command): Constify.
4248 * record.c (cmd_record_start, set_record_command)
4249 (show_record_command, info_record_command, cmd_record_goto):
4251 * ravenscar-thread.c (set_ravenscar_command)
4252 (show_ravenscar_command): Constify.
4253 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4255 (add_internal_problem_command): Remove casts.
4256 * arc-tdep.c (maintenance_print_arc_command): Constify.
4257 * valprint.c (set_print, show_print, set_print_raw)
4258 (show_print_raw): Constify.
4259 * maint.c (maintenance_command, maintenance_info_command)
4260 (maintenance_print_command, maintenance_set_cmd)
4261 (maintenance_show_cmd, set_per_command_cmd)
4262 (show_per_command_cmd, maintenance_check_command): Constify.
4263 * language.c (set_check, show_check): Constify.
4264 * typeprint.c (show_print_type, set_print_type): Constify.
4265 * go32-nat.c (go32_info_dos_command): Constify.
4267 2017-10-11 Tom Tromey <tom@tromey.com>
4269 * breakpoint.c (prepare_re_set_context): Remove.
4270 (breakpoint_re_set_one): Update. Don't use cleanups.
4271 (breakpoint_re_set): Use scoped_restore, std::string, and
4272 scoped_restore_current_language.
4274 2017-10-11 Tom Tromey <tom@tromey.com>
4276 * breakpoint.c (commands_command_1): Use std::string.
4277 (cleanup_executing_breakpoints): Remove.
4278 (bpstat_do_actions_1): Use scoped_restore.
4279 (bpstat_check_watchpoint): Use std::string.
4280 (decode_static_tracepoint_spec): Likewise.
4281 (break_range_command): Likewise.
4282 (watch_command_1): Likewise.
4283 (compare_breakpoints): Change argument types.
4284 (clear_command): Use std::vector.
4285 (cleanup_executing_breakpoints): Remove.
4286 (update_global_location_list): Use unique_xmalloc_ptr.
4287 (strace_command): Remove unused declaration.
4289 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4291 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4292 * NEWS: Mention new FreeBSD/arm native configuration.
4293 * configure.host: Add arm*-*-freebsd*.
4294 * configure.nat: Likewise.
4295 * arm-fbsd-nat.c: New file.
4297 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4299 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4300 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4301 * NEWS: Mention new FreeBSD/arm target.
4302 * configure.tgt: Add arm*-*-freebsd*.
4303 * arm-fbsd-tdep.c: New file.
4304 * arm-fbsd-tdep.h: New file.
4306 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4308 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4309 `gdbarch_elfcore_write_linux_prpsinfo'.
4310 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4312 (elf_internal_linux_prpsinfo): Remove declaration.
4313 * gdbarch.h: Regenerate.
4314 * gdbarch.c: Regenerate.
4316 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4318 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4319 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4321 2017-10-11 Pedro Alves <palves@redhat.com>
4323 * breakpoint.c (reattach_breakpoints): Delete.
4324 * breakpoint.h (reattach_breakpoints): Delete.
4326 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4328 * symfile.c (registered_sym_fns): Make struct, not typedef.
4329 (DEF_VEC_O (registered_sym_fns)): Remove.
4330 (symtab_fns): Change type to std::vector.
4331 (add_symtab_fns): Adjust.
4332 (find_sym_fns): Adjust.
4334 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4336 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4337 * arc-tdep.h (arc_arch_is_em): New function.
4338 (arc_arch_is_hs): Likewise.
4340 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4342 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4343 parentheses in the declaration.
4344 (macro_lookup_inclusion): Likewise.
4345 (macro_lookup_definition): Likewise.
4346 * p-lang.h (pascal_builtin_types): Likewise.
4347 * tui/tui-data.c (tui_win_list): Likewise.
4348 * tui/tui-data.h (tui_win_list): Likewise.
4349 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4351 2017-10-11 Mark Rages <markrages@gmail.com>
4353 * target-memory.c (block_boundaries): Fix for block address not
4354 aligned on block size.
4356 2017-10-10 Pedro Alves <palves@redhat.com>
4357 Tom Tromey <tom@tromey.com>
4359 * breakpoint.c (struct captured_breakpoint_query_args)
4360 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4361 (print_breakpoint): New.
4362 * breakpoint.h (print_breakpoint): Declare.
4363 * common/common-exceptions.h (enum return_reason): Remove
4364 references to catch_exceptions.
4365 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4367 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4368 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4370 * gdbthread.h (thread_select): Declare.
4371 * mi/mi-cmd-break.c: Don't include gdb.h.
4372 (breakpoint_notify): Use print_breakpoint.
4373 * mi/mi-cmd-catch.c: Don't include gdb.h.
4374 * mi/mi-interp.c: Don't include gdb.h.
4375 (mi_print_breakpoint_for_event): New.
4376 (mi_breakpoint_created, mi_breakpoint_modified): Use
4377 mi_print_breakpoint_for_event.
4378 * mi/mi-main.c: Don't include gdb.h.
4379 (mi_cmd_thread_select): Parse the global thread ID here. Use
4380 thread_select instead of gdb_thread_select.
4381 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4382 of using gdb_list_thread_ids.
4383 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4385 (remote_fileio_request): Use TRY/CATCH instead of
4387 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4388 (symbol_file_add_from_memory_wrapper): Delete.
4389 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4390 * thread.c: Don't include gdb.h.
4391 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4392 (thread_alive): Use thread_select.
4393 (do_captured_thread_select): Delete, parts salvaged as ...
4394 (thread_select): ... this new function.
4395 (gdb_thread_select): Delete.
4397 2017-10-10 Pedro Alves <palves@redhat.com>
4398 Tom Tromey <tom@tromey.com>
4400 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
4402 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
4403 No longer macros. Instead ...
4404 (enum wp_check_result): They're now values of this new
4406 (watchpoint_check): Change return type to wp_check_result and
4407 parameter type to bpstat.
4408 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
4409 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
4410 catch_errors. Reverse logic of watchpoint_check call.
4411 (breakpoint_re_set_one): Now returns void and takes a breakpoint
4412 pointer as parameter.
4413 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
4414 * common/common-exceptions.c (throw_exception_sjlj): Update
4415 comments to avoid mentioning catch_errors.
4416 * exceptions.c (catch_errors): Delete.
4417 * exceptions.h: Update comments to avoid mentioning catch_errors.
4418 (catch_errors_ftype, catch_errors): Delete.
4419 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
4420 (hook_stop_stub): Delete.
4421 (restore_selected_frame): Change return type to void, and
4422 parameter type to const frame_id &.
4423 (restore_infcall_control_state): Use TRY/CATCH instead of
4425 * main.c (captured_command_loop): Return void and remove
4426 parameter. Remove references to catch_errors.
4427 (captured_main): Use TRY/CATCH instead of catch_errors.
4428 * objc-lang.c (objc_submethod_helper_data)
4429 (find_objc_msgcall_submethod_helper): Delete.
4430 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
4432 * record-full.c (record_full_message): Return void.
4433 (record_full_message_args, record_full_message_wrapper): Delete.
4434 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
4435 instead of catch_errors.
4436 * solib-aix.c (solib_aix_open_symbol_file_object): Change
4437 parameter type to int.
4438 * solib-darwin.c (open_symbol_file_object): Ditto.
4439 * solib-dsbt.c (open_symbol_file_object): Ditto.
4440 * solib-frv.c (open_symbol_file_object): Ditto.
4441 * solib-svr4.c (open_symbol_file_object): Ditto.
4442 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
4443 * solib.c (update_solib_list): Use TRY/CATCH instead of
4445 * solist.h (struct target_so_ops) <open_symbol_file_object>:
4447 * symmisc.c (struct print_symbol_args): Remove.
4448 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
4449 (print_symbol): Change type.
4450 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
4451 and remove parameters.
4452 (catch_errors): New.
4453 (get_windows_debug_event): Adjust.
4455 2017-10-09 Tom Tromey <tom@tromey.com>
4457 * mi/mi-main.c (free_splay_tree): Remove.
4458 (list_available_thread_groups): Use splay_tree_up.
4459 * common/gdb_splay_tree.h: New file.
4461 2017-10-09 Tom Tromey <tom@tromey.com>
4463 * mi/mi-main.c (do_nothing): Remove.
4464 (list_available_thread_groups): Update.
4466 2017-10-09 Pedro Alves <palves@redhat.com>
4468 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
4469 reading registers when switching context.
4471 2017-10-09 John Baldwin <jhb@FreeBSD.org>
4473 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
4474 (fbsd_convert_siginfo): Likewise.
4475 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
4477 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
4479 * configure.ac (try_guile_versions): Remove guile-2.2.
4480 * configure: Regenerate.
4482 2017-10-09 Tom Tromey <tom@tromey.com>
4484 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
4485 (COMPILE.pre): Use $(CXX).
4487 2017-10-09 Pedro Alves <palves@redhat.com>
4489 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
4491 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4492 * cp-support.h (cp_remove_params): Now returns a
4493 gdb::unique_xmalloc_ptr.
4494 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
4495 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
4496 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
4497 returning a gdb::unique_xmalloc_ptr.
4498 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
4499 * stack.c (find_frame_funname): Adjust to cp_remove_params
4500 returning a gdb::unique_xmalloc_ptr.
4502 2017-10-08 Tom Tromey <tom@tromey.com>
4504 * dwarf2read.c (dwarf2_get_dwz_file): Use
4505 gdb::unique_xmalloc_ptr.
4506 (find_slot_in_mapped_hash): Likewise.
4507 (dwarf2_physname): Likewise.
4508 (create_dwo_unit_in_dwp_v1): Use std::string.
4509 (create_dwo_unit_in_dwp_v2): Likewise.
4510 (lookup_dwo_cutu): Likewise.
4511 (inherit_abstract_dies): Use std::vector.
4512 (read_array_type): Likewise.
4513 (dwarf_decode_macros): Remove unused declaration.
4514 (unsigned_int_compar): Remove.
4515 (dwarf2_build_psymtabs_hard): Use scoped_restore.
4516 (psymtabs_addrmap_cleanup): Remove.
4518 2017-10-08 Tom Tromey <tom@tromey.com>
4520 * frame-unwind.c (frame_unwind_try_unwinder): Update.
4521 * frame.h (frame_cleanup_after_sniffer): Declare.
4522 (frame_prepare_for_sniffer): Return void.
4523 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
4525 (frame_prepare_for_sniffer): Return void.
4527 2017-10-08 Tom Tromey <tom@tromey.com>
4529 * utils.h (make_cleanup_value_free): Remove.
4530 * utils.c (do_value_free, struct cleanup): Remove.
4531 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
4533 * value.h (struct value_deleter): New.
4534 (gdb_value_up): New typedef.
4536 2017-10-08 Tom Tromey <tom@tromey.com>
4538 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
4539 (make_cleanup_free_search_symbols): Remove.
4540 (search_symbols): Return std::vector.
4541 (symbol_search::compare_search_syms): Now member of
4542 symbol_search. Change arguments.
4543 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
4544 (symtab_symbol_info, rbreak_command): Update.
4545 * symtab.h (struct symbol_search) <next>: Remove.
4547 (symbol_search::operator<): New function.
4548 (symbol_search::operator==): New function.
4549 (search_symbols): Remove std::vector.
4550 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
4551 (symbol_search::compare_search_syms): Declare.
4553 2017-10-06 Yao Qi <yao.qi@linaro.org>
4555 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
4556 arch/aarch64-insn.o.
4558 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
4560 2017-10-06 Yao Qi <yao.qi@linaro.org>
4562 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
4563 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
4564 arch/arm-linux.o respectively.
4565 * configure.tgt: Likewise.
4567 2017-10-06 Yao Qi <yao.qi@linaro.org>
4569 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
4570 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
4572 2017-10-06 Pedro Alves <palves@redhat.com>
4574 * windows-nat.c: Include <algorithm>.
4576 2017-10-06 Yao Qi <yao.qi@linaro.org>
4578 * configure.tgt (i386_tobjs): New variable.
4579 (amd64_tobjs): New variable.
4580 Set $cpu_obs and $os_obs.
4582 2017-10-06 Yao Qi <yao.qi@linaro.org>
4584 * Makefile.in (CONFIG_SRC_SUBDIR): New.
4585 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
4586 (clean): Remove object files and dependency files.
4587 (distclean): Remove the directory.
4588 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4589 * configure: Re-generated.
4590 * configure.tgt: Replace amd64.o with arch/amd64.o.
4592 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
4595 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
4598 2017-10-05 Pedro Alves <palves@redhat.com>
4600 * linux-nat.c (linux_child_follow_fork): When following the parent
4601 and detaching the child, consult the parent thread's architecture
4602 instead of the child's.
4604 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4606 * ax.h: Do not include "doublest.h".
4607 (union agent_val): Remove.
4609 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4611 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
4612 (decimal_to_string): Return std::string object.
4613 (decimal_from_string): Accept std::string object. Return bool.
4614 (decimal_from_integral, decimal_from_doublest): Remove.
4615 (decimal_from_longest): Add prototype.
4616 (decimal_from_ulongest): Likewise.
4617 (decimal_to_longest): Likewise.
4618 (decimal_from_doublest): Likewise.
4619 * dfp.c: Do not include "gdbtypes.h" or "value.h".
4620 (MAX_DECIMAL_STRING): Move here.
4621 (decimal_to_string): Return std::string object.
4622 (decimal_from_string): Accept std::string object. Return bool.
4623 (decimal_from_integral): Remove, replace by ...
4624 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
4625 (decimal_to_longest): New function.
4626 (decimal_from_floating): Remove, replace by ...
4627 (decimal_from_doublest): ... this new function.
4628 (decimal_to_doublest): Update to new decimal_to_string interface.
4630 * value.c (unpack_long): Use decimal_to_longest.
4631 * valops.c (value_cast): Use decimal_from_doublest instead of
4632 decimal_from_floating. Use decimal_from_[u]longest isntead of
4633 decimal_from_integral.
4634 * valarith.c (value_args_as_decimal): Likewise.
4635 * valprint.c (print_decimal_floating): Update to new
4636 decimal_to_string interface.
4637 * printcmd.c (printf_decfloat): Likewise.
4638 * c-exp.y (parse_number): Update to new decimal_from_string interface.
4640 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
4642 * doublest.h: Do not include "floatformat.h". Remove stale comments.
4643 * gdbtypes.c: Include "floatformat.h".
4644 * value.c: Likewise.
4645 * m68k-tdep.c: Likewise.
4647 * findvar.c: Do not include "floatformat.h".
4648 * amd64-darwin-tdep.c: Likewise.
4649 * arm-linux-tdep.c: Likewise.
4650 * i386-darwin-tdep.c: Likewise.
4651 * i387-tdep.c: Likewise.
4652 * m68k-linux-tdep.c: Likewise.
4653 * mep-tdep.c: Likewise.
4654 * mips-tdep.c: Likewise.
4655 * nios2-tdep.c: Likewise.
4656 * s390-linux-tdep.c: Likewise.
4657 * sparc-obsd-tdep.c: Likewise.
4658 * sparc-tdep.c: Likewise.
4659 * sparc64-tdep.c: Likewise.
4660 * spu-tdep.c: Likewise.
4661 * tic6x-tdep.c: Likewise.
4662 * tilegx-tdep.c: Likewise.
4663 * vax-tdep.c: Likewise.
4664 * xstormy16-tdep.c: Likewise.
4665 * xtensa-tdep.c: Likewise.
4667 * top.c: Do not include "doublest.h".
4668 * aarch64-tdep.c: Likewise.
4669 * alpha-tdep.c: Likewise.
4670 * arm-linux-tdep.c: Likewise.
4671 * m68k-linux-tdep.c: Likewise.
4672 * tilegx-tdep.c: Likewise.
4673 * xstormy16-tdep.c: Likewise.
4675 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4677 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
4678 (mipsn32_fbsd_sigframe): Define.
4679 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
4680 for FreeBSD/mipsn32.
4682 2017-10-05 John Baldwin <jhb@FreeBSD.org>
4684 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
4687 2017-10-05 Tristan Gingold <tgingold@free.fr>
4689 * MAINTAINERS (Misc): Update my email address.
4691 2017-10-04 Pedro Alves <palves@redhat.com>
4693 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
4694 it instead of target_gdbarch.
4695 (get_remote_state, get_remote_packet_size): Adjust
4696 get_remote_arch_state calls, passing down target_gdbarch
4698 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
4699 'gdbarch' and use it instead of target_gdbarch.
4700 (get_memory_packet_size): Adjust get_remote_arch_state calls,
4701 passing down target_gdbarch explicitly.
4702 (struct stop_reply) <arch>: New field.
4703 (remote_parse_stop_reply): Use the stopped thread's architecture,
4704 not the current inferior's. Save the architecture in the
4706 (process_stop_reply): Use the stop reply's architecture.
4707 (process_g_packet, remote_fetch_registers)
4708 (remote_prepare_to_store, store_registers_using_G)
4709 (remote_store_registers): Adjust get_remote_arch_state calls,
4710 using the regcache's architecture.
4711 (remote_get_trace_status): Adjust get_remote_arch_state calls,
4712 passing down target_gdbarch explicitly.
4713 * spu-multiarch.c (spu_thread_architecture): Defer to the target
4714 beneath instead of calling target_gdbarch.
4715 * target.c (default_thread_architecture): Use the specified
4716 inferior's architecture, instead of the current inferior's
4717 architecture (via target_gdbarch).
4719 2017-10-04 Pedro Alves <palves@redhat.com>
4721 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
4723 (regcache_print): Handle !target_has_registers here instead.
4725 2017-10-04 Pedro Alves <palves@redhat.com>
4727 * frame.c (create_test_frame): Delete.
4728 * frame.h (create_test_frame): Delete.
4729 * gdbarch-selftests.c: Include gdbthread.h and target.h.
4730 (class regcache_test): Delete.
4731 (test_target_has_registers, test_target_has_stack)
4732 (test_target_has_memory, test_target_prepare_to_store)
4733 (test_target_store_registers): New functions.
4734 (test_target_ops): New class.
4735 (register_to_value_test): Error out if there's already a
4736 process_stratum (or higher) target pushed. Create a fuller mock
4737 environment, with mock target_ops, inferior, address space, thread
4739 * progspace.c (struct address_space): Move to ...
4740 * progspace.h (struct address_space): ... here.
4741 * regcache.h (regcache::~regcache, regcache::raw_write)
4742 [GDB_SELF_TEST]: No longer virtual.
4744 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
4746 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
4748 2017-10-04 Pedro Alves <palves@redhat.com>
4750 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
4751 out of 'between TRY and CATCH'.
4753 2017-10-04 Pedro Alves <palves@redhat.com>
4755 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
4756 * common/common-exceptions.h (TRY): Open an outermost scope.
4757 Expand intro comment.
4759 (END_CATCH): Close the outermost scope.
4760 * completer.c (complete_line_internal): Add missing END_CATCH.
4762 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4764 * NEWS (Changes since GDB 8.0): Add entry about new
4765 'set-cwd-on-gdbserver' feature.
4766 (New remote packets): Add entry for QSetWorkingDir.
4767 * common/common-inferior.h (set_inferior_cwd): New prototype.
4768 * infcmd.c (set_inferior_cwd): Remove "static".
4769 (show_cwd_command): Expand text to include remote debugging.
4770 * remote.c: Add PACKET_QSetWorkingDir.
4771 (remote_protocol_features) <QSetWorkingDir>: New entry for
4772 PACKET_QSetWorkingDir.
4773 (extended_remote_set_inferior_cwd): New function.
4774 (extended_remote_create_inferior): Call
4775 "extended_remote_set_inferior_cwd".
4776 (_initialize_remote): Call "add_packet_config_cmd" for
4779 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4781 * NEWS (New commands): Mention "set/show cwd".
4782 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
4783 "cd" command's help text.
4784 * common/common-inferior.h (get_inferior_cwd): New prototype.
4785 * infcmd.c (inferior_cwd_scratch): New global variable.
4786 (set_inferior_cwd): New function.
4787 (get_inferior_cwd): Likewise.
4788 (set_cwd_command): Likewise.
4789 (show_cwd_command): Likewise.
4790 (_initialize_infcmd): Add "set/show cwd" commands.
4791 * inferior.h (class inferior) <cwd>: New field.
4792 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
4793 (fork_inferior): Change inferior's cwd before its execution.
4794 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
4797 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4799 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
4800 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
4801 (COMMON_OBS): Add gdb_tilde_expand.o.
4802 * common/gdb_tilde_expand.c: New file.
4803 * common/gdb_tilde_expand.h: Likewise.
4805 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
4807 * gdbarch.sh (objfile): Remove duplicate declaration.
4808 * gdbarch.h: Regenerate.
4810 2017-10-03 Tom Tromey <tom@tromey.com>
4812 * utils.c (internal_vproblem): Use string_vprintf.
4814 2017-10-03 Tom Tromey <tom@tromey.com>
4816 * printcmd.c (info_symbol_command): Use std::string.
4818 2017-10-03 Tom Tromey <tom@tromey.com>
4820 * top.c (gdb_safe_append_history): Use std::string.
4822 2017-10-03 Tom Tromey <tom@tromey.com>
4824 * event-top.c (stdin_event_handler): Update.
4825 * main.c (captured_main_1): Update.
4826 * top.h (make_delete_ui_cleanup): Remove.
4827 (struct ui): Add constructor and destructor.
4828 (new_ui, delete_ui): Remove.
4829 * top.c (make_delete_ui_cleanup): Remove.
4830 (new_ui_command): Use std::unique_ptr.
4831 (delete_ui_cleanup): Remove.
4832 (ui::ui): Rename from new_ui. Update.
4834 (ui::~ui): Rename from delete_ui. Update.
4836 2017-10-03 Tom Tromey <tom@tromey.com>
4838 * symfile.c (load_progress): Use gdb::byte_vector.
4840 2017-10-03 Tom Tromey <tom@tromey.com>
4842 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
4844 * printcmd.c (x_command): Remove unused declaration.
4845 * symfile.c (symbol_file_command): Remove unused declaration.
4847 2017-10-03 Tom Tromey <tom@tromey.com>
4849 * utils.c (internal_vproblem): Use std::string.
4850 (defaulted_query): Likewise.
4852 2017-10-03 Tom Tromey <tom@tromey.com>
4854 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
4855 * top.c (execute_command_to_string): Update.
4856 * utils.c (make_cleanup_restore_page_info): Remove.
4857 (do_restore_page_info_cleanup): Remove.
4858 (set_batch_flag_and_restore_page_info):
4860 (make_cleanup_restore_page_info): Remove.
4861 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4862 (~set_batch_flag_and_restore_page_info): New
4863 (make_cleanup_restore_uinteger): Remove.
4864 (make_cleanup_restore_integer): Remove.
4865 (struct restore_integer_closure): Remove.
4866 (restore_integer): Remove.
4867 * utils.h (struct set_batch_flag_and_restore_page_info): New
4869 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
4870 (make_cleanup_restore_page_info): Remove.
4871 (make_cleanup_restore_uinteger) Remove.
4872 (make_cleanup_restore_integer) Remove.
4874 2017-10-03 Tom Tromey <tom@tromey.com>
4876 * record-full.h (record_full_gdb_operation_disable_set): Return
4877 scoped_restore_tmpl<int>.
4878 * infrun.c (adjust_pc_after_break): Update.
4879 (handle_signal_stop): Update.
4880 * record-full.c (record_full_gdb_operation_disable_set): Return
4881 scoped_restore_tmpl<int>.
4882 (record_full_wait_1, record_full_insert_breakpoint)
4883 (record_full_remove_breakpoint, record_full_save)
4884 (record_full_goto_insn): Update.
4886 2017-10-02 Tom Tromey <tom@tromey.com>
4889 * rust-lang.c (rust_val_print_str): New function.
4890 (val_print_struct): Call it.
4891 (rust_subscript): Preserve name of slice type.
4893 2017-10-02 Tom Tromey <tom@tromey.com>
4895 * rust-lang.c (rust_subscript): Handle slices in
4896 EVAL_AVOID_SIDE_EFFECTS case.
4898 2017-10-02 Tom Tromey <tom@tromey.com>
4900 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
4902 2017-10-02 Tom Tromey <tom@tromey.com>
4904 * rust-lang.h (rust_slice_type): Add "extern".
4906 2017-10-02 Tom Tromey <tom@tromey.com>
4907 Pedro Alves <palves@redhat.com>
4909 * ada-lang.h (ada_exc_info::operator<): Make const.
4910 (ada_exc_info::operator==): Make const.
4911 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
4914 2017-09-29 Tom Tromey <tom@tromey.com>
4916 * target.c (read_whatever_is_readable): Change type of "result".
4918 (free_memory_read_result_vector): Remove.
4919 (read_memory_robust): Change return type. Update.
4920 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
4921 bin2hex, std::string.
4922 * target.h (memory_read_result_s): Remove typedef.
4923 (free_memory_read_result_vector): Remove.
4924 (read_memory_robust): Return std::vector.
4926 2017-09-29 Tom Tromey <tom@tromey.com>
4928 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
4930 2017-09-29 Tom Tromey <tom@tromey.com>
4932 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
4933 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
4934 operator< and operator==.
4935 (ada_exceptions_list): Return a std::vector.
4936 * ada-lang.c (ada_exc_info::operator<): Rename from
4937 compare_ada_exception_info.
4938 (ada_exc_info::operator==): New.
4939 (sort_remove_dups_ada_exceptions_list): Change type of
4941 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
4942 (ada_add_global_exceptions): Likewise.
4943 (ada_exceptions_list_1): Return a std::vector.
4944 (ada_exceptions_list): Likewise.
4946 2017-09-29 Tom Tromey <tom@tromey.com>
4948 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
4950 (print_one_inferior): Update.
4951 (free_vector_of_ints): Remove.
4952 (list_available_thread_groups): Change "ids" to std::set.
4953 (mi_cmd_list_thread_groups): Update.
4954 (struct collect_cores_data) <core>: Now a std::set.
4955 (collect_cores): Update.
4957 (print_one_inferior): Update.
4959 2017-09-29 Tom Tromey <tom@tromey.com>
4961 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
4962 (mi_execute_async_cli_command): Likewise.
4963 (mi_cmd_trace_frame_collected): Use field_fmt.
4965 2017-09-29 Tom Tromey <tom@tromey.com>
4967 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
4970 2017-09-29 Tom Tromey <tom@tromey.com>
4972 * mi/mi-parse.c (mi_parse): Remove unused declaration.
4974 2017-09-29 Tom Tromey <tom@tromey.com>
4976 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
4978 2017-09-29 Tom Tromey <tom@tromey.com>
4980 * varobj.h (varobj_gen_name): Return std::string.
4981 * varobj.c (varobj_gen_name): Return std::string.
4982 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
4983 (mi_cmd_var_delete): Don't copy "name".
4985 2017-09-29 Tom Tromey <tom@tromey.com>
4987 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
4988 (mi_cmd_break_insert_1): Update.
4990 2017-09-29 Tom Tromey <tom@tromey.com>
4992 * target.h (make_scoped_defer_target_commit_resume): Update.
4993 * target.c (make_scoped_defer_target_commit_resume): Rename from
4994 make_cleanup_defer_target_commit_resume. Return a
4996 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
4998 2017-09-29 Tom Tromey <tom@tromey.com>
5000 * main.c (captured_main_1): Remove unused declaration.
5001 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5003 2017-09-29 Tom Tromey <tom@tromey.com>
5005 * symtab.c (search_symbols): Remove unused outer cleanup.
5006 (make_source_files_completion_list): Remove unused declaration.
5008 2017-09-29 Tom Tromey <tom@tromey.com>
5010 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5012 2017-09-29 Tom Tromey <tom@tromey.com>
5014 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5017 2017-09-29 Tom Tromey <tom@tromey.com>
5019 * complaints.c (vcomplaint): Use std::string.
5021 2017-09-29 Tom Tromey <tom@tromey.com>
5023 * tracepoint.c (trace_variable_command): Use std::string.
5024 (encode_actions_1): Remove unused declarations.
5025 (create_tsv_from_upload): Use std::string.
5027 2017-09-29 Tom Tromey <tom@tromey.com>
5029 * cp-support.c (gdb_demangle): Use std::string.
5031 2017-09-29 Tom Tromey <tom@tromey.com>
5033 * stack.c (parse_frame_specification): Use std::string
5034 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5036 2017-09-29 Tom Tromey <tom@tromey.com>
5038 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5040 2017-09-29 Tom Tromey <tom@tromey.com>
5042 * utils.c (vfprintf_maybe_filtered): Use std::string.
5043 (vfprintf_unfiltered): Likewise.
5045 2017-09-29 Tom Tromey <tom@tromey.com>
5047 * event-top.c (top_level_prompt): Return std::string.
5048 (display_gdb_prompt): Update.
5050 2017-09-29 Tom Tromey <tom@tromey.com>
5052 * unittests/common-utils-selftests.c (format): New function.
5053 (string_vprintf_tests): New function.
5054 (_initialize_common_utils_selftests): Register new tests.
5055 * common/common-utils.c (string_vprintf): New function.
5056 * common/common-utils.h (string_vprintf): Declare.
5058 2017-09-29 Pedro Alves <palves@redhat.com>
5060 * common/rsp-low.c (unpack_varlen_hex): Constify.
5061 * common/rsp-low.h (unpack_varlen_hex): Constify.
5062 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5064 * remote.c (remote_set_permissions, read_ptid)
5065 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5066 (remote_static_tracepoint_marker_at)
5067 (remote_static_tracepoint_markers_by_strid)
5068 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5069 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5070 (parse_tracepoint_definition, parse_tsv_definition)
5071 (parse_static_tracepoint_marker_definition): Constify.
5072 * tracepoint.h (parse_static_tracepoint_marker_definition)
5073 (parse_trace_status, parse_tracepoint_status)
5074 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5076 2017-09-29 Pedro Alves <palves@redhat.com>
5078 * remote.c (target_buf, target_buf_size): Delete.
5079 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5080 Use the connection's packet buffer instead.
5081 All callers adjusted.
5082 (_initialize_remote): Remove references to target_buf and
5085 2017-09-28 Pedro Alves <palves@redhat.com>
5087 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5088 unittests/common-utils-selftests.c.
5089 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5090 (COMMON_OBS): Remove utils-selftests.o.
5091 * utils-selftests.c: Move to ...
5092 * unittests/common-utils-selftests.c: ... here and rename self
5093 test to "string_printf".
5095 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5097 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5098 having NULL cus or tus.
5100 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5102 * arm-tdep.c: (convert_from_extended): Remove.
5103 (convert_to_extended): Likewise.
5104 (arm_extract_return_value): Use convert_typed_floating.
5105 (arm_store_return_value): Likewise.
5107 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5108 * sh-tdep.c: Do not include "floatformat.h".
5109 (sh_littlebyte_bigword_type): New function.
5110 (sh_register_convert_to_virtual): Use convert_typed_floating.
5111 (sh_register_convert_to_raw): Likewise.
5112 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5113 (sh64_littlebyte_bigword_type): New function.
5114 (sh64_extract_return_value): Use convert_typed_floating.
5115 (sh64_register_convert_to_virtual): Likewise.
5116 (sh64_register_convert_to_raw): Likewise.
5118 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5120 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5121 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5123 * gdbtypes.h (union type_specific): Make field floatformat hold
5124 just a single struct floatformat, not an array.
5125 (floatformat_from_type): Move here.
5126 * gdbtypes.c (floatformat_from_type): Move here. Update to
5127 changed TYPE_FLOATFORMAT definition.
5128 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5129 (recursive_dump_type): Likewise.
5130 (init_float_type): Install correct floatformat for byte order.
5131 (arch_float_type): Likewise.
5133 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5135 * gdbtypes.c (init_type): Change incoming argument from
5136 length-in-bytes to length-in-bits. Assert length is a
5137 multiple of TARGET_CHAR_BITS.
5138 (arch_type, arch_flags_type): Likewise.
5139 (init_integer_type): Update call to init_type.
5140 (init_character_type): Likewise.
5141 (init_boolean_type): Likewise.
5142 (init_float_type): Likewise.
5143 (init_decfloat_type): Likewise.
5144 (init_complex_type): Likewise.
5145 (init_pointer_type): Likewise.
5146 (objfile_type): Likewise.
5147 (arch_integer_type): Update call to arch_type.
5148 (arch_character_type): Likewise.
5149 (arch_boolean_type): Likewise.
5150 (arch_float_type): Likewise.
5151 (arch_decfloat_type): Likewise.
5152 (arch_complex_type): Likewise.
5153 (arch_pointer_type): Likewise.
5154 (gdbtypes_post_init): Likewise.
5156 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5157 (read_base_type): Likewise.
5158 * mdebugread.c (basic_type): Likewise.
5159 * stabsread.c (dbx_init_float_type): Likewise.
5160 (rs6000_builtin_type): Likewise.
5161 (read_range_type): Likewise. Also, fix call to init_integer_type
5162 with erroneous length argument.
5164 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5165 * d-lang.c (build_d_types): Likewise.
5166 * f-lang.c (build_fortran_types): Likewise.
5167 * go-lang.c (build_go_types): Likewise.
5168 * opencl-lang.c (build_opencl_types): Likewise.
5169 * jit.c (finalize_symtab): Likewise.
5170 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5171 (build_std_type_info_type): Likewise.
5172 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5173 update call to arch_flags_type.
5175 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5177 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5178 * windows-tdep.c (windows_get_tlb_type): Likewise.
5180 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5181 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5182 * m32c-tdep.c (make_types): Likewise.
5183 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5184 (rl78_psw_type): Update call to arch_flags_type.
5185 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5186 * rx-tdep.c (rx_psw_type): Likewise.
5187 (rx_fpsw_type): Likewise.
5188 * sparc-tdep.c (sparc_psr_type): Likewise.
5189 (sparc_fsr_type): Likewise.
5190 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5191 (sparc64_ccr_type): Likewise.
5192 (sparc64_fsr_type): Likewise.
5193 (sparc64_fprs_type): Likewise.
5195 2017-09-27 Tom Tromey <tom@tromey.com>
5197 * findcmd.c (find_command): Constify.
5199 2017-09-27 Tom Tromey <tom@tromey.com>
5201 * ada-tasks.c (task_command_1, task_command): Constify.
5203 2017-09-27 Tom Tromey <tom@tromey.com>
5205 * symtab.c (maintenance_print_symbol_cache)
5206 (maintenance_flush_symbol_cache)
5207 (maintenance_print_symbol_cache_statistics): Constify.
5209 2017-09-27 Tom Tromey <tom@tromey.com>
5211 * inferior.c (detach_inferior_command, kill_inferior_command)
5212 (inferior_command): Constify.
5214 2017-09-27 Tom Tromey <tom@tromey.com>
5216 * regcache.c (regcache_print, maintenance_print_registers)
5217 (maintenance_print_raw_registers)
5218 (maintenance_print_cooked_registers)
5219 (maintenance_print_register_groups)
5220 (maintenance_print_remote_registers): Constify.
5222 2017-09-27 Tom Tromey <tom@tromey.com>
5224 * printcmd.c (map_display_numbers, undisplay_command)
5225 (enable_disable_display_command, enable_display_command)
5226 (disable_display_command): Constify.
5228 2017-09-27 Tom Tromey <tom@tromey.com>
5230 * breakpoint.h (delete_command): Don't declare.
5231 * breakpoint.c (delete_command, enable_once_command)
5232 (enable_count_command, enable_delete_command, breakpoint_1)
5233 (maintenance_info_breakpoints, stopin_command, stopat_command)
5234 (delete_command, delete_trace_command, save_breakpoints)
5235 (save_breakpoints_command, save_tracepoints_command): Constify.
5237 2017-09-27 Tom Tromey <tom@tromey.com>
5239 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5240 (skip_ws, extract_identifier, macro_define_command)
5241 (macro_undef_command, macro_list_command): Constify.
5243 2017-09-27 Tom Tromey <tom@tromey.com>
5245 * infcmd.c (environment_info, set_environment_command)
5246 (unset_environment_command, path_info, info_proc_cmd_1)
5247 (info_proc_cmd_mappings, info_proc_cmd_stat)
5248 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5249 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5251 2017-09-27 Tom Tromey <tom@tromey.com>
5253 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5256 2017-09-27 Tom Tromey <tom@tromey.com>
5258 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5260 2017-09-27 Tom Tromey <tom@tromey.com>
5262 * demangle.c (demangle_command): Constify.
5264 2017-09-27 Tom Tromey <tom@tromey.com>
5266 * progspace.c (maintenance_info_program_spaces_command):
5269 2017-09-27 Tom Tromey <tom@tromey.com>
5271 * compile/compile.c (check_raw_argument, compile_file_command)
5272 (compile_code_command, compile_print_command): Constify.
5274 2017-09-27 Tom Tromey <tom@tromey.com>
5276 * reggroups.c (maintenance_print_reggroups): Constify.
5278 2017-09-27 Tom Tromey <tom@tromey.com>
5280 * dwarf2read.c (save_gdb_index_command): Constify.
5282 2017-09-27 Tom Tromey <tom@tromey.com>
5284 * stap-probe.c (info_probes_stap_command): Constify.
5286 2017-09-27 Tom Tromey <tom@tromey.com>
5288 * fork-child.c (unset_exec_wrapper_command): Constify.
5290 2017-09-27 Tom Tromey <tom@tromey.com>
5292 * btrace.c (get_uint, get_context_size, no_chunk)
5293 (maint_btrace_packet_history_cmd)
5294 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5295 (maint_info_btrace_cmd): Constify.
5297 2017-09-27 Tom Tromey <tom@tromey.com>
5299 * reverse.c (delete_bookmark_command): Constify.
5301 2017-09-27 Tom Tromey <tom@tromey.com>
5303 * remote.c (set_memory_packet_size)
5304 (set_memory_write_packet_size, show_memory_write_packet_size)
5305 (set_memory_read_packet_size, show_memory_read_packet_size)
5306 (compare_sections_command, packet_command, remote_put_command)
5307 (remote_get_command, remote_delete_command): Constify.
5309 2017-09-27 Tom Tromey <tom@tromey.com>
5311 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5312 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5313 (set_mipsfpu_auto_command): Constify.
5315 2017-09-27 Tom Tromey <tom@tromey.com>
5317 * cli/cli-cmds.h (cd_command): Constify.
5318 * cli/cli-cmds.c (cd_command): Constify.
5320 2017-09-27 Tom Tromey <tom@tromey.com>
5322 * thread.c (thread_name_command, thread_find_command): Constify.
5324 2017-09-27 Tom Tromey <tom@tromey.com>
5326 * probe.c (enable_probes_command, disable_probes_command):
5329 2017-09-27 Tom Tromey <tom@tromey.com>
5331 * symfile.c (symbol_file_command): Constify.
5332 * gdbcore.h (deprecated_file_changed_hook): Constify.
5333 * exec.c (deprecated_file_changed_hook, exec_file_command)
5334 (file_command): Constify.
5335 * defs.h (symbol_file_command): Constify.
5337 2017-09-27 Tom Tromey <tom@tromey.com>
5339 * remote-fileio.c (set_system_call_allowed)
5340 (show_system_call_allowed): Constify.
5342 2017-09-27 Tom Tromey <tom@tromey.com>
5344 * tracepoint.c (delete_trace_variable_command)
5345 (tfind_end_command, tfind_start_command, tfind_pc_command)
5346 (tfind_tracepoint_command, tfind_line_command)
5347 (tfind_range_command, tfind_outside_command): Constify.
5349 2017-09-27 Tom Tromey <tom@tromey.com>
5351 * ax-gdb.c (maint_agent_printf_command, agent_command)
5352 (agent_eval_command): Constify.
5354 2017-09-27 Tom Tromey <tom@tromey.com>
5356 * tracepoint.c (info_scope_command): Constify.
5357 * python/python.c (gdbpy_decode_line): Constify.
5358 * python/py-breakpoint.c (bppy_init): Constify.
5359 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5360 * location.h: (new_linespec_location)
5361 (string_to_event_location_basic, string_to_event_location):
5363 * location.c (new_linespec_location)
5364 (string_to_event_location_basic, string_to_event_location):
5366 * linespec.h (decode_line_with_current_source)
5367 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5368 * linespec.c (linespec_lex_to_end)
5369 (decode_line_with_current_source)
5370 (decode_line_with_last_displayed): Constify.
5371 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5373 * cli/cli-cmds.c (edit_command, list_command): Constify.
5374 * breakpoint.h (until_break_command, watch_command_wrapper)
5375 (awatch_command_wrapper, rwatch_command_wrapper)
5376 (init_ada_exception_breakpoint): Constify.
5377 * breakpoint.c (break_command_1, dprintf_command)
5378 (break_range_command, watch_command_wrapper)
5379 (rwatch_command_wrapper, awatch_command_wrapper)
5380 (until_break_command, init_ada_exception_breakpoint)
5381 (strace_marker_create_sals_from_location, trace_command)
5382 (ftrace_command, strace_command, struct tracepoint): Constify.
5383 * ax-gdb.c (agent_command_1): Constify.
5384 * ada-lang.c (ada_exception_sal): Constify.
5386 2017-09-27 Tom Tromey <tom@tromey.com>
5388 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5389 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5390 (get_context_size, no_chunk, get_insn_history_modifiers)
5391 (cmd_record_insn_history, get_call_history_modifiers)
5392 (cmd_record_call_history): Constify.
5394 2017-09-27 Tom Tromey <tom@tromey.com>
5396 * source.c (show_substitute_path_command)
5397 (unset_substitute_path_command, set_substitute_path_command):
5400 2017-09-27 Tom Tromey <tom@tromey.com>
5402 * typeprint.c (maintenance_print_type): Constify.
5403 * maint.c (maintenance_dump_me, maintenance_demangle)
5404 (maintenance_time_display, maintenance_info_sections)
5405 (maintenance_print_statistics, maintenance_deprecate)
5406 (maintenance_undeprecate): Constify.
5407 (maintenance_do_deprecate): Constify. Use std::string.
5408 (maintenance_selftest): Constify.
5409 * gdbtypes.h (maintenance_print_type): Constify.
5411 2017-09-27 Tom Tromey <tom@tromey.com>
5413 * hppa-tdep.c (unwind_command): Constify.
5415 2017-09-27 Tom Tromey <tom@tromey.com>
5417 * target-descriptions.c (unset_tdesc_filename_cmd)
5418 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
5421 2017-09-27 Tom Tromey <tom@tromey.com>
5423 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
5425 2017-09-27 Tom Tromey <tom@tromey.com>
5427 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
5429 2017-09-27 Tom Tromey <tom@tromey.com>
5431 * tui/tui-regs.c (tui_reg_command): Constify.
5433 2017-09-27 Tom Tromey <tom@tromey.com>
5435 * skip.c (skip_file_command, skip_function_command)
5436 (skip_enable_command, skip_disable_command, skip_delete_command):
5439 2017-09-27 Tom Tromey <tom@tromey.com>
5441 * record-btrace.c (cmd_record_btrace_bts_start)
5442 (cmd_record_btrace_pt_start): Constify.
5444 2017-09-27 Tom Tromey <tom@tromey.com>
5446 * symmisc.c (maintenance_print_symbols)
5447 (maintenance_print_msymbols, maintenance_print_objfiles)
5448 (maintenance_info_symtabs, maintenance_check_symtabs)
5449 (maintenance_expand_symtabs, maintenance_info_line_tables):
5452 2017-09-27 Tom Tromey <tom@tromey.com>
5454 * top.c (new_ui_command): Constify.
5456 2017-09-27 Tom Tromey <tom@tromey.com>
5458 * symfile.c (add_symbol_file_command)
5459 (remove_symbol_file_command, list_overlays_command)
5460 (map_overlay_command, unmap_overlay_command)
5461 (overlay_auto_command, overlay_manual_command)
5462 (overlay_off_command, overlay_load_command): Constify.
5464 2017-09-27 Tom Tromey <tom@tromey.com>
5466 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
5467 (info_spu_mailbox_command, info_spu_dma_command)
5468 (info_spu_proxydma_command): Constify.
5470 2017-09-27 Tom Tromey <tom@tromey.com>
5472 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
5474 2017-09-27 Tom Tromey <tom@tromey.com>
5476 * cli/cli-script.c (user_defined_command): Constify.
5478 2017-09-27 Tom Tromey <tom@tromey.com>
5480 * cli/cli-dump.c (dump_memory_command, dump_value_command)
5481 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
5482 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
5483 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
5484 (dump_binary_value, append_binary_memory, append_binary_value):
5486 (struct dump_context) <func>: Constify.
5487 (add_dump_command): Update.
5489 2017-09-27 Tom Tromey <tom@tromey.com>
5491 * cli/cli-cmds.c (show_version, show_configuration)
5492 (source_command, show_user): Constify.
5494 2017-09-27 Tom Tromey <tom@tromey.com>
5496 * target.c (maintenance_print_target_stack): Constify.
5498 2017-09-27 Tom Tromey <tom@tromey.com>
5500 * interps.c (interpreter_exec_cmd): Constify.
5502 2017-09-27 Tom Tromey <tom@tromey.com>
5504 * record-full.c (cmd_record_full_restore): Constify.
5506 2017-09-27 Tom Tromey <tom@tromey.com>
5508 * memattr.c (enable_mem_command, disable_mem_command)
5509 (delete_mem_command): Constify.
5511 2017-09-27 Tom Tromey <tom@tromey.com>
5513 * value.c (show_convenience): Constify.
5515 2017-09-27 Tom Tromey <tom@tromey.com>
5517 * gdbcore.h (core_file_command): Update.
5518 * corefile.c (core_file_command): Constify.
5520 2017-09-27 Tom Tromey <tom@tromey.com>
5522 * user-regs.c (maintenance_print_user_registers): Constify.
5524 2017-09-27 Tom Tromey <tom@tromey.com>
5526 * cp-namespace.c (maintenance_cplus_namespace): Constify.
5528 2017-09-27 Tom Tromey <tom@tromey.com>
5530 * cp-support.c (first_component_command): Constify.
5532 2017-09-27 Tom Tromey <tom@tromey.com>
5534 * psymtab.c (maintenance_print_psymbols)
5535 (maintenance_info_psymtabs, maintenance_check_psymtabs):
5538 2017-09-27 Tom Tromey <tom@tromey.com>
5540 * windows-tdep.c (display_tib): Constify.
5542 2017-09-27 Tom Tromey <tom@tromey.com>
5544 * linux-fork.c (delete_checkpoint_command)
5545 (detach_checkpoint_command): Constify.
5547 2017-09-27 Tom Tromey <tom@tromey.com>
5549 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
5551 2017-09-27 Tom Tromey <tom@tromey.com>
5553 * arc-tdep.c (dump_arc_instruction_command): Constify.
5555 2017-09-27 Tom Tromey <tom@tromey.com>
5557 * valprint.c (set_radix, show_radix): Constify.
5559 2017-09-27 Tom Tromey <tom@tromey.com>
5561 * dtrace-probe.c (info_probes_dtrace_command): Constify.
5563 2017-09-27 Tom Tromey <tom@tromey.com>
5565 * command.h (not_just_help_class_command): Update.
5566 * cli/cli-decode.h (not_just_help_class_command): Update.
5567 * cli/cli-decode.c (not_just_help_class_command): Constify.
5569 2017-09-27 Tom Tromey <tom@tromey.com>
5571 * gdb_bfd.c (maintenance_info_bfds): Constify.
5573 2017-09-27 Tom Tromey <tom@tromey.com>
5575 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
5577 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
5578 (do_const_cfunc): New function.
5579 (cmd_cfunc_eq): New overload.
5580 (cli_user_command_p): Check do_const_cfunc.
5581 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
5583 * command.h (add_cmd): Add const overload and no-function
5585 (set_cmd_cfunc): Add const overload.
5586 (cmd_const_cfunc_ftype): Declare.
5587 (cmd_cfunc_eq): Add const overload.
5588 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
5589 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
5592 2017-09-27 Tom Tromey <tom@tromey.com>
5594 * macroexp.c (get_next_token_for_substitution): New function.
5595 (substitute_args): Call it. Check for __VA_OPT__.
5597 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5598 Pedro Alves <palves@redhat.com>
5600 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5601 producer_is_icc_lt_14.
5602 (producer_is_icc_lt_14): New function.
5603 (check_producer): Add code for checking version of ICC.
5604 (producer_is_icc): Move to producer.c.
5605 (read_structure_type): Restrict ICC workaround to ICC<14.
5606 * producer.c: Include selftest.h.
5607 (producer_is_icc, producer_parsing_tests, _initialize_producer):
5609 * producer.h (producer_is_icc): New declaration.
5611 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
5613 * Makefile.in (SFILES): Add producer.c.
5614 (COMMON_OBS): Add producer.o
5615 * amd64-tdep.c (producer.h): Add new include.
5616 * dwarf2read.c (producer.h): Add new include.
5617 * producer.c: New file.
5618 * producer.h: New file.
5619 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
5621 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
5624 2017-09-26 Matthias Klose <doko@ubuntu.com>
5626 * configure.ac: Search ncursesw before ncurses.
5627 Check ncursesw/ncurses.h before ncurses/ncurses.h.
5628 * gdb_curses.h: Include <ncursesw/ncurses.h>
5629 * config.in, configure: Regenerate.
5631 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5634 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
5636 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
5637 Remove i386sol2 support.
5638 * configure.nat <i386sol2>: Remove.
5639 <sol2-64>: Fold into ...
5641 Move common settings to default section.
5643 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
5644 x86_64-*-solaris2.1[0-9]*>: Rename to ...
5645 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
5646 <i[34567]86-*-solaris*>: Remove.
5647 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
5649 * configure.ac: Remove wctype in libw check.
5650 (_MSE_INT_H): Don't define on Solaris 7-9.
5651 <solaris*>: Remove libthread_db.so.1 check.
5652 * configure: Regenerate.
5653 * config.in: Regenerate.
5655 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
5656 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
5657 (gdb_ps_size_t): Remove.
5658 Use base types in users.
5659 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
5661 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
5663 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5666 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
5667 (adi_is_addr_mapped): Likewise.
5668 (PSR_ICC): Don't redefine.
5669 (PSR_IMPL): Likewise.
5671 2017-09-25 Tom Tromey <tom@tromey.com>
5673 * regcache.c (regcache::dump): Use string_printf.
5675 2017-09-25 Tom Tromey <tom@tromey.com>
5677 * regcache.c (class regcache_invalidator): New.
5678 (struct register_to_invalidate): Remove.
5679 (make_cleanup_regcache_invalidate): Remove.
5680 (regcache::raw_write): Use regcache_invalidator.
5682 2017-09-25 Tom Tromey <tom@tromey.com>
5684 * spu-tdep.c (spu2ppu_sniffer): Update.
5685 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
5686 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
5688 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
5689 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
5690 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
5691 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
5692 (frame_pop): Update.
5694 2017-09-25 Tom Tromey <tom@tromey.com>
5696 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
5697 * regcache.h (regcache_xfree): Don't declare.
5698 * regcache.c (regcache_xfree): Remove.
5699 (do_regcache_xfree): Use delete.
5700 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
5701 * linux-fork.c (free_fork): Use delete.
5702 (fork_save_infrun_state): Likewise.
5703 * jit.c (jit_dealloc_cache): Use delete.
5704 * infrun.c (discard_infcall_suspend_state): Use delete.
5706 2017-09-25 Tom Tromey <tom@tromey.com>
5708 * regcache.h (regcache_xmalloc): Don't declare.
5709 (regcache_raw_set_cached_value): Update comment.
5710 * regcache.c (regcache_xmalloc): Remove.
5711 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
5712 * jit.c (jit_frame_sniffer): Use new.
5713 * frame.c (frame_save_as_regcache): Use new.
5715 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5717 * NEWS: Advertise support for guarded-storage registers on IBM z.
5719 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5721 * s390-linux-nat.c (have_regset_gs): New static variable.
5722 (s390_linux_fetch_inferior_registers): Handle guarded-storage
5723 control block and guarded-storage broadcast control regsets.
5724 (s390_read_description): Detect whether the target has
5725 guarded-storage support, return appropriate tdesc.
5726 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
5727 (features/s390x-gs-linux64.c): Likewise.
5728 (struct gdbarch_tdep) <have_gs>: New field.
5729 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
5730 (s390_gsbc_regset): New variables.
5731 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
5732 and s390_gsbc_regset, if applicable.
5733 (s390_core_read_description): Check whether core file was from a
5734 target with guarded-storage support; include appropriate regsets.
5735 (s390_gdbarch_init): Add registers for guarded-storage support.
5736 (_initialize_s390_tdep): Initialize new target descriptions that
5737 include registers for guarded-storage support.
5738 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
5739 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
5740 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
5741 (S390_NUM_REGS): Adjust macro definition.
5742 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
5743 (tdesc_s390x_gs_linux64): New declarations.
5745 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
5747 * features/s390-gs-linux64.xml: New file.
5748 * features/s390-gs.xml: New file.
5749 * features/s390-gsbc.xml: New file.
5750 * features/s390x-gs-linux64.xml: New file.
5751 * features/Makefile (WHICH): Add s390-gs-linux64 and
5753 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
5754 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
5755 * features/s390-gs-linux64.c: New generated file.
5756 * features/s390x-gs-linux64.c: New file.
5757 * regformats/s390-gs-linux64.dat: New file.
5758 * regformats/s390x-gs-linux64.dat: New file.
5760 2017-09-23 Tom Tromey <tom@tromey.com>
5762 * defs.h (make_cleanup_override_quit_handler): Don't declare.
5764 2017-09-22 Tom Tromey <tom@tromey.com>
5766 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
5767 type to scoped_restore_tmpl.
5768 <scoped_input_handler>: Initialize m_quit_handler directly.
5770 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5772 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
5773 (cd_command): Likewise. Free "current_directory" before
5775 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
5776 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
5777 * top.c (gdb_dirbuf): Remove global declaration.
5778 * top.h (gdb_dirbuf): Likewise.
5780 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
5782 * gnulib/aclocal.m4: Regenerate.
5783 * gnulib/config.in: Regenerate.
5784 * gnulib/configure: Regenerate.
5785 * gnulib/import/Makefile.am: Regenerate.
5786 * gnulib/import/Makefile.in: Regenerate.
5787 * gnulib/import/assure.h: New file.
5788 * gnulib/import/at-func.c: Likewise
5789 * gnulib/import/chdir-long.c: New file.
5790 * gnulib/import/chdir-long.h: New file.
5791 * gnulib/import/cloexec.c: New file.
5792 * gnulib/import/cloexec.h: New file.
5793 * gnulib/import/close.c: New file.
5794 * gnulib/import/closedir.c: New file.
5795 * gnulib/import/dirent-private.h: New file.
5796 * gnulib/import/dup-safer.c: New file.
5797 * gnulib/import/dup.c: New file.
5798 * gnulib/import/dup2.c: New file.
5799 * gnulib/import/error.c: New file.
5800 * gnulib/import/error.h: New file.
5801 * gnulib/import/exitfail.c: New file.
5802 * gnulib/import/exitfail.h: New file.
5803 * gnulib/import/fchdir.c: New file.
5804 * gnulib/import/fcntl.c: New file.
5805 * gnulib/import/fcntl.in.h: New file.
5806 * gnulib/import/fd-hook.c: New file.
5807 * gnulib/import/fd-hook.h: New file.
5808 * gnulib/import/fd-safer.c: New file.
5809 * gnulib/import/fdopendir.c: New file.
5810 * gnulib/import/filename.h: New file.
5811 * gnulib/import/filenamecat-lgpl.c: New file.
5812 * gnulib/import/filenamecat.h: New file.
5813 * gnulib/import/fstat.c: New file.
5814 * gnulib/import/fstatat.c: New file.
5815 * gnulib/import/getcwd-lgpl.c: New file.
5816 * gnulib/import/getcwd.c: New file.
5817 * gnulib/import/getdtablesize.c: New file.
5818 * gnulib/import/getlogin_r.c: New file.
5819 * gnulib/import/getprogname.c: New file.
5820 * gnulib/import/getprogname.h: New file.
5821 * gnulib/import/gettext.h: New file.
5822 * gnulib/import/glob-libc.h: New file.
5823 * gnulib/import/glob.c: New file.
5824 * gnulib/import/glob.in.h: New file.
5825 * gnulib/import/intprops.h: New file.
5826 * gnulib/import/m4/chdir-long.m4: New file.
5827 * gnulib/import/m4/close.m4: New file.
5828 * gnulib/import/m4/closedir.m4: New file.
5829 * gnulib/import/m4/d-ino.m4: New file.
5830 * gnulib/import/m4/d-type.m4: New file.
5831 * gnulib/import/m4/dup.m4: New file.
5832 * gnulib/import/m4/dup2.m4: New file.
5833 * gnulib/import/m4/error.m4: New file.
5834 * gnulib/import/m4/fchdir.m4: New file.
5835 * gnulib/import/m4/fcntl.m4: New file.
5836 * gnulib/import/m4/fcntl_h.m4: New file.
5837 * gnulib/import/m4/fdopendir.m4: New file.
5838 * gnulib/import/m4/filenamecat.m4: New file.
5839 * gnulib/import/m4/fstat.m4: New file.
5840 * gnulib/import/m4/fstatat.m4: New file.
5841 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
5842 * gnulib/import/m4/getcwd-path-max.m4: New file.
5843 * gnulib/import/m4/getcwd.m4: New file.
5844 * gnulib/import/m4/getdtablesize.m4: New file.
5845 * gnulib/import/m4/getlogin_r.m4: New file.
5846 * gnulib/import/m4/getprogname.m4: New file.
5847 * gnulib/import/m4/glob.m4: New file.
5848 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
5849 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
5850 * gnulib/import/m4/mempcpy.m4: New file.
5851 * gnulib/import/m4/memrchr.m4: New file.
5852 * gnulib/import/m4/mode_t.m4: New file.
5853 * gnulib/import/m4/msvc-inval.m4: New file.
5854 * gnulib/import/m4/msvc-nothrow.m4: New file.
5855 * gnulib/import/m4/open.m4: New file.
5856 * gnulib/import/m4/openat.m4: New file.
5857 * gnulib/import/m4/opendir.m4: New file.
5858 * gnulib/import/m4/readdir.m4: New file.
5859 * gnulib/import/m4/realloc.m4: New file.
5860 * gnulib/import/m4/rewinddir.m4: New file.
5861 * gnulib/import/m4/save-cwd.m4: New file.
5862 * gnulib/import/m4/strdup.m4: New file.
5863 * gnulib/import/m4/strerror.m4: New file.
5864 * gnulib/import/m4/unistd-safer.m4: New file.
5865 * gnulib/import/mempcpy.c: New file.
5866 * gnulib/import/memrchr.c: New file.
5867 * gnulib/import/msvc-inval.c: New file.
5868 * gnulib/import/msvc-inval.h: New file.
5869 * gnulib/import/msvc-nothrow.c: New file.
5870 * gnulib/import/msvc-nothrow.h: New file.
5871 * gnulib/import/open.c: New file.
5872 * gnulib/import/openat-die.c: New file.
5873 * gnulib/import/openat-priv.h: New file.
5874 * gnulib/import/openat-proc.c: New file.
5875 * gnulib/import/openat.c: New file.
5876 * gnulib/import/openat.h: New file.
5877 * gnulib/import/opendir.c: New file.
5878 * gnulib/import/pipe-safer.c: New file.
5879 * gnulib/import/readdir.c: New file.
5880 * gnulib/import/realloc.c: New file.
5881 * gnulib/import/rewinddir.c: New file.
5882 * gnulib/import/save-cwd.c: New file.
5883 * gnulib/import/save-cwd.h: New file.
5884 * gnulib/import/strdup.c: New file.
5885 * gnulib/import/strerror-override.c: New file.
5886 * gnulib/import/strerror-override.h: New file.
5887 * gnulib/import/strerror.c: New file.
5888 * gnulib/import/unistd--.h: New file.
5889 * gnulib/import/unistd-safer.h: New file.
5890 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
5891 "getcwd" and "glob".
5892 * ser-tcp.c: Undefine "close" before redefining it.
5894 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5896 * guile/scm-value.c (gdbscm_value_address): Initialize address,
5899 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5901 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
5902 <sol2,sparc>: Likewise.
5903 <sol2-64,i386>: Likewise.
5905 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
5906 -Wdeprecated-declarations on *-*-solaris*.
5907 * configure: Regenerate.
5909 * procfs.c: Include "nat/inferior.h".
5910 (procfs_info_proc): Fix typo.
5912 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5914 * remote.c (vector): Include.
5915 (struct private_thread_info): Add field, thread_handle.
5916 (free_private_thread_info): Deallocate storage associated with
5918 (get_private_info_thread): Initialize `thread_handle' field.
5919 (struct thread_item): Add field, thread_handle.
5920 (clear_threads_listing_context): Deallocate storage associated
5922 (start_thread): Add support for "handle" attribute.
5923 (thread_attributes): Add "handle".
5924 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
5926 (remote_update_thread_list): Update thread_handle.
5927 (remote_thread_handle_to_thread_info): New function.
5928 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
5930 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5932 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
5934 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
5935 * python/python-internal.h (thread_object_type): Declare.
5937 2017-09-21 Kevin Buettner <kevinb@redhat.com>
5939 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
5940 (target_thread_handle_to_thread_info): Declare.
5941 * target.c (target_thread_handle_to_thread_info): New function.
5942 * target-delegates.c: Regenerate.
5943 * gdbthread.h (find_thread_by_handle): Declare.
5944 * thread.c (find_thread_by_handle): New function.
5945 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
5947 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
5949 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5951 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
5953 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
5955 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
5957 2017-09-21 Yao Qi <yao.qi@linaro.org>
5959 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
5962 2017-09-20 Tom Tromey <tom@tromey.com>
5964 * breakpoint.c (struct counted_command_line): Remove.
5965 (breakpoint_commands): Update.
5966 (alloc_counted_command_line, incref_counted_command_line)
5967 (decref_counted_command_line, do_cleanup_counted_command_line)
5968 (make_cleanup_decref_counted_command_line): Remove.
5969 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
5970 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
5971 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
5972 (save_breakpoints): Update.
5973 * breakpoint.h (counted_command_line): Now a typedef to
5975 (struct breakpoint) <commands>: Now a counted_command_line.
5976 (struct bpstats) <command>: Likewise.
5978 2017-09-20 Tom Tromey <tom@tromey.com>
5980 * breakpoint.c (struct commands_info, do_map_commands_command):
5982 (commands_command_1): Update.
5983 (iterate_over_related_breakpoints): Take a function_view.
5984 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
5985 (delete_command): Update.
5986 (map_breakpoint_numbers): Take a function_view.
5987 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
5988 (disable_command): Update.
5989 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
5990 (enable_command): Update.
5991 (struct disp_data, do_enable_breakpoint_disp)
5992 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
5993 (do_map_enable_delete_breakpoint): Remove.
5994 (enable_once_command, enable_count_command, enable_delete_command)
5995 (delete_trace_variable_command): Update.
5997 2017-09-20 Tom Tromey <tom@tromey.com>
5999 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6000 (bpstat_clear): Use delete.
6001 (bpstats): New constructors.
6002 (bpstat_copy, bpstat_stop_status): Use new.
6003 (dprintf_after_condition_true): Update.
6004 * breakpoint.h (bpstats::bpstats): Add constructors.
6005 (bpstats::~bpstats): Add destructor.
6007 2017-09-20 Pedro Alves <palves@redhat.com>
6009 * eval.c (make_params): Delete, refactored as ...
6010 (class fake_method): ... this new type's ctor.
6011 (fake_method::~fake_method): New.
6012 (evaluate_subexp_standard): Use 'fake_method'.
6014 2017-09-20 Tom Tromey <tom@tromey.com>
6016 * windows-nat.c (get_windows_debug_event, windows_wait)
6017 (do_initial_windows_stuff, windows_attach): Update.
6018 * utils.c (vwarning, internal_vproblem): Update.
6019 (ui_unregister_input_event_handler_cleanup)
6020 (prepare_to_handle_input): Remove.
6021 (class scoped_input_handler): New.
6022 (defaulted_query, prompt_for_continue): Update.
6023 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6025 * top.c (undo_terminal_modifications_before_exit): Update.
6026 * target/target.h (target_terminal_init, target_terminal_inferior)
6027 (target_terminal_ours): Don't declare.
6028 (class target_terminal): New.
6029 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6030 (target_terminal_ours_for_output)
6031 (make_cleanup_restore_target_terminal): Don't declare.
6032 (target_terminal_info): Remove.
6033 * target.c (enum terminal_state, terminal_state): Remove.
6034 (target_terminal::terminal_state): Define.
6035 (target_terminal::init): Rename from target_terminal_init.
6036 (target_terminal::inferior): Rename from
6037 target_terminal_inferior.
6038 (target_terminal::ours): Rename from target_terminal_ours.
6039 (target_terminal::ours_for_output): Rename from
6040 target_terminal_ours_for_output.
6041 (target_terminal::info): New method.
6042 (cleanup_restore_target_terminal)
6043 (make_cleanup_restore_target_terminal): Remove.
6044 * solib.c (handle_solib_event): Update.
6045 * remote.c (remote_serial_quit_handler): Update.
6046 (remote_terminal_inferior, remote_wait_as): Update.
6047 * record-full.c (record_full_wait_1): Update.
6048 * nto-procfs.c (procfs_create_inferior): Update.
6049 * nat/fork-inferior.c (startup_inferior): Update.
6050 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6051 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6052 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6053 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6054 (mi_breakpoint_created, mi_breakpoint_deleted)
6055 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6056 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6057 (mi_user_selected_context_changed, report_initial_inferior):
6059 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6060 (linux_nat_terminal_inferior): Update.
6061 * infrun.c (follow_fork_inferior)
6062 (handle_vfork_child_exec_or_exit, do_target_resume)
6063 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6064 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6066 * inflow.c (child_terminal_init, info_terminal_command): Update.
6067 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6068 (attach_command): Update.
6069 * infcall.c (call_thread_fsm_should_stop): Update.
6070 * gnu-nat.c (gnu_attach): Update.
6071 * extension.c (struct active_ext_lang_state)
6072 (restore_active_ext_lang): Update.
6073 * exceptions.c (print_flush): Update.
6074 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6075 (struct quit_handler_cleanup_data, restore_quit_handler)
6076 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6078 * cp-support.c (gdb_demangle): Update.
6079 * breakpoint.c (update_inserted_breakpoint_locations)
6080 (insert_breakpoint_locations, handle_jit_event)
6081 (disable_breakpoints_in_unloaded_shlib): Update.
6082 * annotate.c (annotate_breakpoints_invalid)
6083 (annotate_frames_invalid): Update.
6085 2017-09-20 Tom Tromey <tom@tromey.com>
6087 * main.c (catch_command_errors): Rename from
6088 catch_command_errors_const.
6089 (captured_main_1): Update.
6091 2017-09-20 Pedro Alves <palves@redhat.com>
6093 * cli/cli-cmds.c (list_command): Use print_sal_location.
6094 (print_sal_location): New function.
6095 (ambiguous_line_spec): Use print_sal_location.
6096 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6097 * symtab.c (find_function_start_sal): Likewise.
6098 * symtab.h (symtab_and_line::symbol): New field.
6100 2017-09-20 Pedro Alves <palves@redhat.com>
6102 * linespec.c (minsym_found): Handle non-text minsyms.
6103 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6105 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6107 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6110 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6112 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6113 vmovups instead vmovaps.
6114 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6116 2017-09-19 John Baldwin <jhb@FreeBSD.org>
6118 * NEWS (Changes since GDB 8.0): Add starti.
6119 * infcmd.c (enum run_break): New.
6120 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6122 (run_command): Use enum run_how.
6123 (start_command): Likewise.
6124 (starti_command): New function.
6125 (RUN_ARGS_HELP): New macro.
6126 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6127 commands. Add starti command.
6129 2017-09-19 Yao Qi <yao.qi@linaro.org>
6131 * Makefile.in (monitor.o): Remove the rule.
6133 2017-09-19 Yao Qi <yao.qi@linaro.org>
6135 * annotate.h (struct annotate_arg_emitter): Use
6136 DISABLE_COPY_AND_ASSIGN.
6137 * common/refcounted-object.h (refcounted_object): Likewise.
6138 * completer.h (struct completion_result): Likewise.
6139 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6140 * filename-seen-cache.h (filename_seen_cache): Likewise.
6141 * gdbcore.h (thread_section_name): Likewise.
6142 * gdb_regex.h (compiled_regex): Likewise.
6143 * gdbthread.h (scoped_restore_current_thread): Likewise.
6144 * inferior.h (scoped_restore_current_inferior): Likewise.
6145 * jit.c (jit_reader): Likewise.
6146 * linespec.h (struct linespec_result): Likewise.
6147 * mi/mi-parse.h (struct mi_parse): Likewise.
6148 * nat/fork-inferior.c (execv_argv): Likewise.
6149 * progspace.h (scoped_restore_current_program_space): Likewise.
6150 * python/python-internal.h (class gdbpy_enter): Likewise.
6151 * regcache.h (regcache): Likewise.
6152 * target-descriptions.c (struct tdesc_reg): Likewise.
6153 (struct tdesc_type): Likewise.
6154 (struct tdesc_feature): Likewise.
6155 * ui-out.h (ui_out_emit_type): Likewise.
6157 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6159 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6160 label abort_expression.
6162 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6164 * common/buffer.c (buffer_xml_printf): Adjust.
6165 * common/xml-utils.c (xml_escape_text): Change return type to
6166 std::string, update code accordingly.
6167 * common/xml-utils.h (xml_escape_text): Change return type to
6169 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6170 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6171 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6174 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6176 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6177 (SUBDIR_UNITTESTS_OBS): Add new object file.
6178 * unittests/xml-utils-selftests.c: New file.
6180 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6182 * common/selftest.h (selftest): New struct/interface.
6183 (register_test): Add name parameter, add new overload.
6184 (run_tests): Add filter parameter.
6185 (for_each_selftest_ftype): New typedef.
6186 (for_each_selftest): New declaration.
6187 * common/selftest.c (tests): Change type to
6188 map<string, unique_ptr<selftest>>.
6189 (simple_selftest): New struct.
6190 (register_test): New function.
6191 (register_test): Add name parameter and use it.
6192 (run_tests): Add filter parameter and use it. Add prints.
6193 Adjust to vector -> map change.
6194 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6195 registering selftests.
6196 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6197 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6198 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6199 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6200 * findvar.c (_initialize_findvar): Likewise.
6201 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6202 * maint.c (maintenance_selftest): Update call to run_tests.
6203 (maintenance_info_selftests): New function.
6204 (_initialize_maint_cmds): Register "maintenance info selftests"
6205 command. Update "maintenance selftest" doc.
6206 * regcache.c (_initialize_regcache): Add names when registering
6208 * rust-exp.y (_initialize_rust_exp): Likewise.
6209 * selftest-arch.c (gdbarch_selftest): New struct.
6210 (gdbarch_tests): Remove.
6211 (register_test_foreach_arch): Add name parameter. Call
6213 (tests_with_arch): Remove, move most content to
6214 gdbarch_selftest::operator().
6215 (_initialize_selftests_foreach_arch): Remove.
6216 * selftest-arch.h (register_test_foreach_arch): Add name
6218 (run_tests_with_arch): New declaration.
6219 * utils-selftests.c (_initialize_utils_selftests): Add names
6220 when registering selftests.
6221 * utils.c (_initialize_utils): Likewise.
6222 * unittests/array-view-selftests.c
6223 (_initialize_array_view_selftests): Likewise.
6224 * unittests/environ-selftests.c (_initialize_environ_selftests):
6226 * unittests/function-view-selftests.c
6227 (_initialize_function_view_selftests): Likewise.
6228 * unittests/offset-type-selftests.c
6229 (_initialize_offset_type_selftests): Likewise.
6230 * unittests/optional-selftests.c
6231 (_initialize_optional_selftests): Likewise.
6232 * unittests/scoped_restore-selftests.c
6233 (_initialize_scoped_restore_selftests): Likewise.
6234 * NEWS: Document "maintenance selftest" and "maint info
6237 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6239 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6242 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6244 * mi/mi-main.c (mi_load_progress): Make uiout variable
6247 2017-09-15 Pedro Alves <palves@redhat.com>
6249 * compile/compile-c-types.c (convert_enum, convert_int)
6250 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6252 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6254 * dwarf2read.c (copy_string): Remove.
6255 (parse_macro_definition): Replace copy_string with savestring.
6257 2017-09-15 Yao Qi <yao.qi@linaro.org>
6259 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6261 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6263 (i[34567]86-*-linux*): Likewise.
6265 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6267 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6268 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6269 <stack>: Change type to std::vector.
6270 <stack_len, stack_allocated>: Remove.
6271 <grow_stack>: Remove.
6272 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6273 (dwarf_expr_context::~dwarf_expr_context): Remove.
6274 (dwarf_expr_context::grow_stack): Remove.
6275 (dwarf_expr_context::push): Adjust.
6276 (dwarf_expr_context::pop): Adjust.
6277 (dwarf_expr_context::fetch): Adjust.
6278 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6279 (dwarf_expr_context::stack_empty_p): Adjust.
6280 (dwarf_expr_context::execute_stack_op): Adjust.
6282 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6284 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6285 return type to bool.
6286 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6288 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6290 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6291 Change type to bool.
6292 (dwarf_stack_value) <in_stack_memory>: Likewise.
6293 (dwarf_expr_context) <push_address>: Change parameter type to
6295 <fetch_in_stack_memory>: Change return type to bool.
6296 <push>: Change parameter type to bool.
6297 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6299 (dwarf_expr_context::push_address): Likewise.
6300 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6302 (dwarf_expr_context::execute_stack_op): Adjust.
6303 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6305 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6307 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6308 (struct dwarf_expr_context) <n_pieces>: Remove.
6309 <pieces>: Change type to std::vector.
6310 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6311 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6313 (dwarf_expr_context::add_piece): Adjust.
6314 * dwarf2loc.c (struct piece_closure): Initialize fields.
6316 <pieces>: Change type to std::vector.
6317 (allocate_piece_closure): Adjust, change parameter to
6318 std::vector rvalue and std::move it to piece_closure.
6319 (rw_pieced_value): Adjust.
6320 (check_pieced_synthetic_pointer): Adjust.
6321 (indirect_synthetic_pointer): Adjust.
6322 (coerce_pieced_ref): Adjust.
6323 (free_pieced_value_closure): Adjust. Use delete to free
6325 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6326 to allocate_piece_closure.
6327 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6329 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6331 * probe.h (probe_ops_cp): Remove typedef.
6332 (DEF_VEC_P (probe_ops_cp)): Remove.
6333 (all_probe_ops): Change type to std::vector.
6334 * probe.c (info_probes_for_ops): Adjust to vector change.
6335 (probe_linespec_to_ops): Likewise.
6336 (all_probe_ops): Change type to std::vector.
6337 (_initialize_probe): Adjust to vector change.
6338 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6339 * elfread.c (elf_get_probes): Likewise.
6340 * stap-probe.c (_initialize_stap_probe): Likewise.
6342 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6344 * probe.h (struct bound_probe): Define constructors.
6345 * probe.c (bound_probe_s): Remove typedef.
6346 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6347 (collect_probes): Change return type to std::vector, remove
6349 (compare_probes): Return bool, change parameter type. Change
6350 semantic to "less than".
6351 (gen_ui_out_table_header_info): Change parameter to std::vector
6353 (exists_probe_with_pops): Likewise.
6354 (info_probes_for_ops): Update to std::vector change.
6355 (enable_probes_command): Likewise.
6356 (disable_probes_command): Likewise.
6358 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6360 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6362 * probe.c (parse_probes_in_pspace): Update.
6363 (find_probes_in_objfile): Update.
6364 (find_probe_by_pc): Update.
6365 (collect_probes): Update.
6366 (probe_any_get_probes): Update.
6367 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6368 return type to reference to std::vector.
6369 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6370 std::vector and update.
6371 (dtrace_process_dof): Likewise.
6372 (dtrace_get_probes): Likewise.
6373 * elfread.c (elf_get_probes): Change return type to std::vector,
6374 store an std::vector in bfd_data.
6375 (probe_key_free): Update to std::vector.
6376 * stap-probe.c (handle_stap_probe): Change parameter to
6377 std::vector and update.
6378 (stap_get_probes): Likewise.
6379 * symfile-debug.c (debug_sym_get_probes): Change return type to
6380 std::vector and update.
6382 2017-09-11 Tom Tromey <tom@tromey.com>
6384 * breakpoint.c (program_breakpoint_here_p): Update.
6385 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6386 from make_show_memory_breakpoints_cleanup. Return a
6387 scoped_restore_tmpl<int>.
6388 (restore_show_memory_breakpoints): Remove.
6389 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6390 * mem-break.c (memory_validate_breakpoint): Update.
6391 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6392 (ia64_memory_remove_breakpoint): Update.
6393 (ia64_breakpoint_from_pc): Update.
6394 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6395 from make_show_memory_breakpoints_cleanup.
6397 2017-09-11 Tom Tromey <tom@tromey.com>
6399 * d-namespace.c (d_lookup_symbol): Use std::string.
6400 (find_symbol_in_baseclass): Likewise.
6402 2017-09-11 Tom Tromey <tom@tromey.com>
6404 * ctf.c (ctf_start): Use std::string.
6406 2017-09-11 Tom Tromey <tom@tromey.com>
6408 * ada-lang.c (is_known_support_routine): Update.
6409 (ada_unhandled_exception_name_addr_from_raise): Update.
6410 * guile/scm-frame.c (gdbscm_frame_name): Update.
6411 * python/py-frame.c (frapy_name): Update.
6412 (frapy_function): Update.
6413 * stack.h (find_frame_funname): Update.
6414 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
6415 (print_frame): Update.
6417 2017-09-11 Tom Tromey <tom@tromey.com>
6419 * findcmd.c (put_bits): Take a gdb::byte_vector.
6420 (parse_find_args): Return gdb::byte_vector. "args" now const.
6421 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
6423 (find_command): Update.
6425 2017-09-11 Tom Tromey <tom@tromey.com>
6427 * cli/cli-script.c (class scoped_restore_hook_in): New.
6428 (clear_hook_in_cleanup): Remove.
6429 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
6430 scoped_restore_hook_in.
6432 2017-09-11 Tom Tromey <tom@tromey.com>
6434 * cli/cli-script.c (restore_interp): Remove.
6435 (read_command_lines): Use scoped_restore_interp.
6436 * interps.c (scoped_restore_interp::set_temp): Rename from
6438 * interps.h (class scoped_restore_interp): New.
6439 (interp_set_temp): Remove.
6441 2017-09-11 Tom Tromey <tom@tromey.com>
6443 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6444 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
6445 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
6447 (mi_cmd_break_insert_1): Update.
6448 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
6451 2017-09-11 Tom Tromey <tom@tromey.com>
6453 * demangle.c (demangle_command): Update.
6454 * breakpoint.c (disable_command): Update.
6455 (enable_command): Update.
6456 (find_location_by_number): Make "number" const. Use
6458 * cli/cli-utils.c (extract_arg): Return std::string.
6459 * probe.c (parse_probe_linespec): Update. Change types.
6460 (collect_probes): Take string arguments.
6461 (parse_probe_linespec): Likewise.
6462 (info_probes_for_ops): Update.
6463 (enable_probes_command): Update.
6464 (disable_probes_command): Update.
6465 * break-catch-sig.c (catch_signal_split_args): Update.
6466 * mi/mi-parse.c (mi_parse): Update.
6468 2017-09-11 Tom Tromey <tom@tromey.com>
6470 * language.h (language_enum): Make argument const.
6471 * language.c (language_enum): Make argument const.
6473 2017-09-11 Tom Tromey <tom@tromey.com>
6475 * common/common-utils.h (skip_to_space): Remove macro, redeclare
6477 (skip_to_space): Rename from skip_to_space_const.
6478 * common/common-utils.c (skip_to_space): New function.
6479 (skip_to_space): Rename from skip_to_space_const.
6480 * cli/cli-utils.h (get_number): Rename from get_number_const.
6481 (extract_arg): Rename from extract_arg_const.
6482 * cli/cli-utils.c (get_number): Rename from get_number_const.
6483 (extract_arg): Rename from extract_arg_const.
6484 (number_or_range_parser::get_number): Use ::get_number.
6485 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
6486 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
6487 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
6488 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
6489 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
6490 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
6491 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
6492 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
6494 2017-09-11 Tom Tromey <tom@tromey.com>
6496 * python/python.c (do_start_initialization): Use
6497 py-event-types.def to initialize types.
6498 Define all object type structures.
6499 * python/python-internal.h: Don't declare event initialization
6501 * python/py-threadevent.c (thread_event_object_type): Don't
6503 * python/py-stopevent.c (stop_event_object_type): Don't define.
6504 * python/py-signalevent.c (signal_event_object_type): Don't
6506 * python/py-newobjfileevent.c (new_objfile_event_object_type)
6507 (clear_objfiles_event_object_type): Don't declare or define.
6508 * python/py-infevents.c (inferior_call_pre_event_object_type)
6509 (inferior_call_post_event_object_type)
6510 (register_changed_event_object_type)
6511 (memory_changed_event_object_type): Don't declare or define.
6512 * python/py-inferior.c (new_thread_event_object_type)
6513 (new_inferior_event_object_type)
6514 (inferior_deleted_event_object_type): Don't declare or define.
6515 * python/py-exitedevent.c (exited_event_object_type): Don't
6517 * python/py-evts.c (gdbpy_initialize_py_events): Use
6519 * python/py-events.h (thread_event_object_type): Don't declare.
6520 (events_object): Use py-all-events.def.
6521 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
6523 * python/py-event-types.def: New file.
6524 * python/py-continueevent.c (create_continue_event_object): Don't
6526 * python/py-bpevent.c (breakpoint_event_object_type): Don't
6528 * python/py-all-events.def: New file.
6530 2017-09-11 Tom Tromey <tom@tromey.com>
6532 * python/py-threadevent.c (create_thread_event_object): Return
6534 * python/py-stopevent.h (create_stop_event_object)
6535 (create_breakpoint_event_object, create_signal_event_object):
6537 * python/py-stopevent.c (create_stop_event_object): Return
6539 (emit_stop_event): Update.
6540 * python/py-signalevent.c (create_signal_event_object): Return
6542 * python/py-infevents.c (create_inferior_call_event_object):
6544 * python/py-event.h (create_event_object)
6545 (create_thread_event_object): Update.
6546 * python/py-event.c (create_event_object): Return gdbpy_ref.
6547 * python/py-continueevent.c: Return gdbpy_ref.
6548 * python/py-bpevent.c (create_breakpoint_event_object): Return
6551 2017-09-11 Tom Tromey <tom@tromey.com>
6555 * python/python.c (do_start_initialization): Initialize new event
6557 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
6558 (gdbpy_initialize_inferior_deleted_event)
6559 (gdbpy_initialize_new_thread_event): Declare.
6560 * python/py-threadevent.c (create_thread_event_object): Add option
6562 * python/py-inferior.c (new_thread_event_object_type)
6563 (new_inferior_event_object_type)
6564 (inferior_deleted_event_object_type): Declare.
6565 (python_new_inferior, python_inferior_deleted): New functions.
6566 (add_thread_object): Emit new_thread event.
6567 (gdbpy_initialize_inferior): Attach new functions to corresponding
6569 (new_thread, new_inferior, inferior_deleted): Define new event
6571 * python/py-evts.c (gdbpy_initialize_py_events): Add new
6573 * python/py-events.h (events_object) <new_inferior,
6574 inferior_deleted, new_thread>: New fields.
6575 * python/py-event.h (create_thread_event_breakpoint): Add optional
6578 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
6580 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
6581 check current_ui instead.
6582 (internal_vproblem): Likewise.
6584 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
6586 * thread.c (print_thread_info_1): Remove unnecessary calls to
6587 uiout->is_mi_like_p.
6589 2017-09-09 Tom Tromey <tom@tromey.com>
6591 * namespace.h (add_using_directive): Update.
6592 * namespace.c (add_using_directive): Change type of excludes to
6594 * dwarf2read.c (read_import_statement): Use std::vector.
6595 (read_namespace): Update.
6596 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
6598 2017-09-09 Tom Tromey <tom@tromey.com>
6600 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
6602 2017-09-09 Tom Tromey <tom@tromey.com>
6604 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
6606 2017-09-09 Tom Tromey <tom@tromey.com>
6608 * stack.c (func_command): Use gdb::def_vector.
6610 2017-09-09 Tom Tromey <tom@tromey.com>
6612 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
6613 ui_out_emit_list, ui_out_emit_tuple.
6614 (mi_cmd_var_update): Likewise.
6616 2017-09-09 Tom Tromey <tom@tromey.com>
6618 * mi/mi-interp.c (mi_user_selected_context_changed): Use
6619 ui_out_redirect_pop.
6620 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6621 ui_out_redirect_pop.
6622 * utils.c (do_ui_out_redirect_pop)
6623 (make_cleanup_ui_out_redirect_pop): Remove.
6624 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
6625 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
6626 * ui-out.h (ui_out_redirect_pop): New class.
6628 2017-09-09 Tom Tromey <tom@tromey.com>
6630 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
6631 (list_available_thread_groups, mi_cmd_list_thread_groups)
6632 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
6633 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
6636 2017-09-09 Tom Tromey <tom@tromey.com>
6638 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
6641 2017-09-09 Tom Tromey <tom@tromey.com>
6643 * target.c (flash_erase_command): Use ui_out_emit_tuple.
6644 * stack.c (print_frame): Use ui_out_emit_tuple.
6645 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
6646 (info_spu_mailbox_command, info_spu_dma_command)
6647 (info_spu_proxydma_command): Likewise.
6648 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
6649 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
6650 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6652 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
6654 2017-09-09 Tom Tromey <tom@tromey.com>
6656 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
6657 (class ui_out_emit_table): Update comment.
6658 * ui-out.c (do_cleanup_table_end)
6659 (make_cleanup_ui_out_table_begin_end): Remove.
6660 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
6661 (info_spu_dma_cmdlist): Likewise.
6662 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
6663 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
6666 2017-09-09 Tom Tromey <tom@tromey.com>
6668 * thread.c (print_thread_info_1): Use ui_out_emit_table,
6669 ui_out_emit_list, gdb::optional.
6671 2017-09-09 John Baldwin <jhb@FreeBSD.org>
6673 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
6675 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
6677 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
6679 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
6680 * ada-exp.y: Remove _initialize_ada_exp prototype.
6681 * ada-lang.c: Remove _initialize_ada_language prototype.
6682 * ada-tasks.c: Remove _initialize_tasks prototype.
6683 * addrmap.c: Remove _initialize_addrmap prototype.
6684 * agent.c: Remove _initialize_agent prototype.
6685 * aix-thread.c: Remove _initialize_aix_thread prototype.
6686 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
6687 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
6688 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
6690 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
6691 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
6692 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
6693 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
6695 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
6697 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
6698 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
6699 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
6700 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
6702 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
6703 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
6704 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
6705 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
6706 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6707 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
6708 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
6710 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
6712 * annotate.c: Remove _initialize_annotate prototype.
6713 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
6714 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
6715 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
6716 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
6717 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
6718 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
6719 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
6720 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
6722 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
6723 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
6724 * auto-load.c: Remove _initialize_auto_load prototype.
6725 * auxv.c: Remove _initialize_auxv prototype.
6726 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
6727 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
6728 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
6729 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
6730 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
6731 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
6733 * break-catch-throw.c: Remove _initialize_break_catch_throw
6735 * breakpoint.c: Remove _initialize_breakpoint prototype.
6736 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
6737 * btrace.c: Remove _initialize_btrace prototype.
6738 * charset.c: Remove _initialize_charset prototype.
6739 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
6740 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
6741 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
6742 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
6743 * cli/cli-script.c: Remove _initialize_cli_script prototype.
6744 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
6745 * coffread.c: Remove _initialize_coffread prototype.
6746 * compile/compile.c: Remove _initialize_compile prototype.
6747 * complaints.c: Remove _initialize_complaints prototype.
6748 * completer.c: Remove _initialize_completer prototype.
6749 * copying.awk: Remove _initialize_copying prototype.
6750 * copying.c: Regenerate.
6751 * core-regset.c: Remove _initialize_core_regset prototype.
6752 * corefile.c: Remove _initialize_core prototype.
6753 * corelow.c: Remove _initialize_corelow prototype.
6754 * cp-abi.c: Remove _initialize_cp_abi prototype.
6755 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
6756 * cp-support.c: Remove _initialize_cp_support prototype.
6757 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
6758 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
6759 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
6760 * ctf.c: Remove _initialize_ctf prototype.
6761 * d-lang.c: Remove _initialize_d_language prototype.
6762 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
6764 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
6765 * dbxread.c: Remove _initialize_dbxread prototype.
6766 * dcache.c: Remove _initialize_dcache prototype.
6767 * demangle.c: Remove _initialize_demangler prototype.
6768 * disasm-selftests.c: Remove _initialize_disasm_selftests
6770 * disasm.c: Remove _initialize_disasm prototype.
6771 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
6772 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
6773 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
6775 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
6776 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
6777 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
6778 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
6779 * elfread.c: Remove _initialize_elfread prototype.
6780 * exec.c: Remove _initialize_exec prototype.
6781 * extension.c: Remove _initialize_extension prototype.
6782 * f-lang.c: Remove _initialize_f_language prototype.
6783 * f-valprint.c: Remove _initialize_f_valprint prototype.
6784 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
6785 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
6786 * filesystem.c: Remove _initialize_filesystem prototype.
6787 * findcmd.c: Remove _initialize_mem_search prototype.
6788 * fork-child.c: Remove _initialize_fork_child prototype.
6789 * frame-base.c: Remove _initialize_frame_base prototype.
6790 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
6791 * frame.c: Remove _initialize_frame prototype.
6792 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
6793 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
6794 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
6795 * gcore.c: Remove _initialize_gcore prototype.
6796 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
6797 * gdbarch.c: Regenerate.
6798 * gdbarch.sh: Remove _initialize_gdbarch prototype.
6799 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
6800 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
6801 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
6802 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
6803 * go-lang.c: Remove _initialize_go_language prototype.
6804 * go32-nat.c: Remove _initialize_go32_nat prototype.
6805 * guile/guile.c: Remove _initialize_guile prototype.
6806 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
6807 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
6808 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
6809 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
6810 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
6811 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
6812 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
6813 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
6814 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
6815 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
6817 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
6819 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
6820 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
6821 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
6822 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
6823 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
6824 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
6825 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
6826 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
6827 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
6828 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
6829 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
6830 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
6831 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
6832 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
6833 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
6834 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
6836 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
6838 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
6839 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
6840 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
6841 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
6842 * infcall.c: Remove _initialize_infcall prototype.
6843 * infcmd.c: Remove _initialize_infcmd prototype.
6844 * inferior.c: Remove _initialize_inferiors prototype.
6845 * inflow.c: Remove _initialize_inflow prototype.
6846 * infrun.c: Remove _initialize_infrun prototype.
6847 * interps.c: Remove _initialize_interpreter prototype.
6848 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
6849 * jit.c: Remove _initialize_jit prototype.
6850 * language.c: Remove _initialize_language prototype.
6851 * linux-fork.c: Remove _initialize_linux_fork prototype.
6852 * linux-nat.c: Remove _initialize_linux_nat prototype.
6853 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
6854 * linux-thread-db.c: Remove _initialize_thread_db prototype.
6855 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
6856 * m2-lang.c: Remove _initialize_m2_language prototype.
6857 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
6858 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
6859 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
6860 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
6861 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
6862 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6863 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6864 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
6865 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
6866 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
6867 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
6868 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
6869 * machoread.c: Remove _initialize_machoread prototype.
6870 * macrocmd.c: Remove _initialize_macrocmd prototype.
6871 * macroscope.c: Remove _initialize_macroscope prototype.
6872 * maint.c: Remove _initialize_maint_cmds prototype.
6873 * mdebugread.c: Remove _initialize_mdebugread prototype.
6874 * memattr.c: Remove _initialize_mem prototype.
6875 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
6876 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
6877 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
6878 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
6879 * mi/mi-main.c: Remove _initialize_mi_main prototype.
6880 * microblaze-linux-tdep.c: Remove
6881 _initialize_microblaze_linux_tdep prototype.
6882 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
6883 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
6884 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
6885 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
6886 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
6887 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
6888 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
6889 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
6890 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
6891 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
6892 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
6894 * mipsread.c: Remove _initialize_mipsread prototype.
6895 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
6897 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
6898 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
6899 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
6900 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
6901 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
6902 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
6904 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
6905 * nto-procfs.c: Remove _initialize_procfs prototype.
6906 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
6907 * objc-lang.c: Remove _initialize_objc_language prototype.
6908 * objfiles.c: Remove _initialize_objfiles prototype.
6909 * observer.c: Remove observer_test_first_notification_function,
6910 observer_test_second_notification_function,
6911 observer_test_third_notification_function, and
6912 _initialize_observer prototypes.
6913 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
6914 * osabi.c: Remove _initialize_gdb_osabi prototype.
6915 * osdata.c: Remove _initialize_osdata prototype.
6916 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
6917 * parse.c: Remove _initialize_parse prototype.
6918 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
6919 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
6920 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
6921 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
6922 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
6923 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
6924 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
6925 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
6926 * printcmd.c: Remove _initialize_printcmd prototype.
6927 * probe.c: Remove _initialize_probe prototype.
6928 * proc-api.c: Remove _initialize_proc_api prototype.
6929 * proc-events.c: Remove _initialize_proc_events prototype.
6930 * proc-service.c: Remove _initialize_proc_service prototype.
6931 * procfs.c: Remove _initialize_procfs prototype.
6932 * psymtab.c: Remove _initialize_psymtab prototype.
6933 * python/python.c: Remove _initialize_python prototype.
6934 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
6935 * record-btrace.c: Remove _initialize_record_btrace prototype.
6936 * record-full.c: Remove _initialize_record_full prototype.
6937 * record.c: Remove _initialize_record prototype.
6938 * regcache.c: Remove _initialize_regcache prototype.
6939 * reggroups.c: Remove _initialize_reggroup prototype.
6940 * remote-notif.c: Remove _initialize_notif prototype.
6941 * remote-sim.c: Remove _initialize_remote_sim prototype.
6942 * remote.c: Remove _initialize_remote prototype.
6943 * reverse.c: Remove _initialize_reverse prototype.
6944 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
6945 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
6946 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
6948 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
6949 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
6950 * rust-exp.y: Remove _initialize_rust_exp prototype.
6951 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
6952 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
6953 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
6954 * score-tdep.c: Remove _initialize_score_tdep prototype.
6955 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
6957 * ser-go32.c: Remove _initialize_ser_dos prototype.
6958 * ser-mingw.c: Remove _initialize_ser_windows prototype.
6959 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
6960 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
6961 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
6962 * serial.c: Remove _initialize_serial prototype.
6963 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
6964 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
6965 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
6966 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
6967 * skip.c: Remove _initialize_step_skip prototype.
6968 * sol-thread.c: Remove _initialize_sol_thread prototype.
6969 * solib-aix.c: Remove _initialize_solib_aix prototype.
6970 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
6971 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
6972 * solib-frv.c: Remove _initialize_frv_solib prototype.
6973 * solib-spu.c: Remove _initialize_spu_solib prototype.
6974 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
6975 * solib-target.c: Remove _initialize_solib_target prototype.
6976 * solib.c: Remove _initialize_solib prototype.
6977 * source.c: Remove _initialize_source prototype.
6978 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
6979 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
6981 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
6982 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
6983 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
6984 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
6986 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
6987 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
6988 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
6989 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
6991 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
6993 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
6995 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
6997 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
6998 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7000 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7002 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7004 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7006 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7008 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7009 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7010 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7011 * stabsread.c: Remove _initialize_stabsread prototype.
7012 * stack.c: Remove _initialize_stack prototype.
7013 * stap-probe.c: Remove _initialize_stap_probe prototype.
7014 * std-regs.c: Remove _initialize_frame_reg prototype.
7015 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7016 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7017 * symfile.c: Remove _initialize_symfile prototype.
7018 * symmisc.c: Remove _initialize_symmisc prototype.
7019 * symtab.c: Remove _initialize_symtab prototype.
7020 * target-dcache.c: Remove _initialize_target_dcache prototype.
7021 * target-descriptions.c: Remove _initialize_target_descriptions
7023 * thread.c: Remove _initialize_thread prototype.
7024 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7026 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7027 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7028 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7030 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7031 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7032 * tracefile.c: Remove _initialize_tracefile prototype.
7033 * tracepoint.c: Remove _initialize_tracepoint prototype.
7034 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7035 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7036 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7037 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7038 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7039 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7040 * tui/tui.c: Remove _initialize_tui prototype.
7041 * typeprint.c: Remove _initialize_typeprint prototype.
7042 * user-regs.c: Remove _initialize_user_regs prototype.
7043 * utils.c: Remove _initialize_utils prototype.
7044 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7045 * valarith.c: Remove _initialize_valarith prototype.
7046 * valops.c: Remove _initialize_valops prototype.
7047 * valprint.c: Remove _initialize_valprint prototype.
7048 * value.c: Remove _initialize_values prototype.
7049 * varobj.c: Remove _initialize_varobj prototype.
7050 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7051 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7052 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7053 * windows-nat.c: Remove _initialize_windows_nat,
7054 _initialize_check_for_gdb_ini, and _initialize_loadable
7056 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7057 * xcoffread.c: Remove _initialize_xcoffread prototype.
7058 * xml-support.c: Remove _initialize_xml_support prototype.
7059 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7060 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7062 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7064 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7066 2017-09-08 Keith Seitz <keiths@redhat.com>
7068 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7071 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7073 * f-valprint.c (f_val_print): Remove check for one byte
7074 sized integers. Remove printing of character type.
7076 2017-09-08 Frank Penczek <frank.penczek@intel.com>
7077 Christoph Weinmann <christoph.t.weinmann@intel.com>
7078 Bernhard Heckel <bernhard.heckel@intel.com>
7080 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7081 to maintain proper indentation when printing pointers/refs.
7083 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7087 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7089 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7091 2017-09-05 Tom Tromey <tom@tromey.com>
7093 * parse.c (funcall_chain): Now a std::vector.
7094 (start_arglist, end_arglist): Simplify.
7095 (free_funcalls): Remove.
7096 (parse_exp_in_context_1): Remove cleanup.
7098 2017-09-05 Tom Tromey <tom@tromey.com>
7100 * go-exp.y (go_parse): Don't create a cleanup.
7102 2017-09-05 Tom Tromey <tom@tromey.com>
7104 * d-exp.y (PrimaryExpression): Use std::string.
7105 (d_parse): Don't create a cleanup.
7107 2017-09-05 Tom Tromey <tom@tromey.com>
7109 * utils.c (do_clear_parser_state): Remove.
7110 (make_cleanup_clear_parser_state): Remove.
7111 * p-exp.y (pascal_parse): Use scoped_restore.
7112 * m2-exp.y (m2_parse): Use scoped_restore.
7113 * f-exp.y (f_parse): Use scoped_restore.
7114 * d-exp.y (d_parse): Use scoped_restore.
7115 * c-exp.y (c_parse): Use scoped_restore.
7116 * ada-exp.y (ada_parse): Use scoped_restore.
7117 * utils.h (make_cleanup_clear_parser_state): Remove.
7119 2017-09-06 Keith Seitz <keiths@redhat.com>
7121 * dwarf2read.c (dw2_linkage_name_attr): New function.
7122 (dw2_linkage_name): New function.
7123 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7124 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7125 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7127 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7129 * config/djgpp/djconfig.sh: Correct shell portability issue.
7131 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7133 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7135 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7137 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7138 * NEWS: Mention new FreeBSD/mips native configuration.
7139 * configure.host: Add aarch64*-*-freebsd*.
7140 * configure.nat: Likewise.
7141 * aarch64-fbsd-nat.c: New file.
7143 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7145 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7146 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7147 * NEWS: Mention new FreeBSD/aarch64 target.
7148 * configure.tgt: Add aarch64*-*-freebsd*.
7149 * aarch64-fbsd-tdep.c: New file.
7150 * aarch64-fbsd-tdep.h: New file.
7152 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7154 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7156 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7158 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7161 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7163 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7166 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7168 * infrun.c (follow_exec): Call add_thread after
7169 target_find_description.
7171 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7173 * infrun.c (handle_inferior_event_1): When exec'ing, read
7174 stop_pc after follow_exec.
7176 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7178 * remote.c (process_g_packet): Update error message.
7180 2017-09-05 Yao Qi <yao.qi@linaro.org>
7182 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7185 2017-09-05 Pedro Alves <palves@redhat.com>
7187 * eval.c (eval_call, evaluate_funcall): New functions, factored
7189 (evaluate_subexp_standard): ... this.
7191 2017-09-05 Yao Qi <yao.qi@linaro.org>
7193 * amd64-tdep.c (amd64_target_description): Create target
7195 (_initialize_amd64_tdep): Don't call functions
7196 initialize_tdesc_amd64_*. Add self tests.
7197 * arch/amd64.c (amd64_create_target_description): Add parameter
7198 is_linux. Call set_tdesc_osabi if is_linux is true.
7199 * arch/amd64.h (amd64_create_target_description): Update the
7201 * arch/i386.c (i386_create_target_description): Add parameter
7202 is_linux. Call set_tdesc_osabi if is_linux is true.
7203 * arch/i386.h (i386_create_target_description): Update
7205 * configure.tgt: Add i386.o to gdb_target_obs.
7206 * features/Makefile (XMLTOC): Remove i386/*.xml.
7207 * features/i386/amd64-avx-avx512.c: Remove.
7208 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7209 * features/i386/amd64-avx-mpx.c: Remove.
7210 * features/i386/amd64-avx.c: Remove.
7211 * features/i386/amd64-mpx.c: Remove.
7212 * features/i386/amd64.c: Remove.
7213 * features/i386/i386-avx-avx512.c: Remove.
7214 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7215 * features/i386/i386-avx-mpx.c: Remove.
7216 * features/i386/i386-avx.c: Remove.
7217 * features/i386/i386-mmx.c: Remove.
7218 * features/i386/i386-mpx.c: Remove.
7219 * features/i386/i386.c: Remove.
7220 * i386-tdep.c: Don't include features/i386/i386*.c., include
7221 target-descriptions.h and arch/i386.h.
7222 (i386_target_description): Create target descriptions.
7223 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7224 functions. Do self tests.
7226 2017-09-05 Yao Qi <yao.qi@linaro.org>
7228 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7229 * features/i386/amd64-avx-avx512-linux.c: Removed.
7230 * features/i386/amd64-avx-linux.c: Removed.
7231 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7232 * features/i386/amd64-avx-mpx-linux.c: Removed.
7233 * features/i386/amd64-linux.c: Removed.
7234 * features/i386/amd64-mpx-linux.c: Removed.
7235 * features/i386/x32-avx-avx512-linux.c: Removed.
7236 * features/i386/x32-avx-linux.c: Removed.
7237 * features/i386/x32-linux.c: Removed.
7239 2017-09-05 Yao Qi <yao.qi@linaro.org>
7241 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7243 (amd64_linux_read_description): Call
7244 amd64_create_target_description.
7245 * arch/amd64.c: New file.
7246 * arch/amd64.h: New file.
7247 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7248 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7250 2017-09-05 Yao Qi <yao.qi@linaro.org>
7252 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7253 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7254 (amd64_linux_read_description): Create target descriptions.
7255 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7256 functions. Add unit tests.
7257 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7259 * features/i386/64bit-avx.c: Generated.
7260 * features/i386/64bit-avx512.c: Generated.
7261 * features/i386/64bit-core.c: Generated.
7262 * features/i386/64bit-linux.c: Generated.
7263 * features/i386/64bit-mpx.c: Generated.
7264 * features/i386/64bit-pkeys.c: Generated.
7265 * features/i386/64bit-segments.c: Generated.
7266 * features/i386/64bit-sse.c: Generated.
7267 * features/i386/x32-core.c: Generated.
7268 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7269 c files for amd64-linux and x32-linux.
7271 2017-09-05 Yao Qi <yao.qi@linaro.org>
7273 * amd64-linux-tdep.c (amd64_linux_read_description): New
7275 (amd64_linux_core_read_description): Call
7276 amd64_linux_read_description.
7277 (amd64_linux_init_abi): Likewise.
7278 (amd64_x32_linux_init_abi): Likewise.
7279 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7280 * x86-linux-nat.c (x86_linux_read_description): Call
7281 amd64_linux_read_description.
7283 2017-09-05 Yao Qi <yao.qi@linaro.org>
7285 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7288 2017-09-05 Yao Qi <yao.qi@linaro.org>
7290 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7291 * features/i386/i386-avx-avx512-linux.c: Remove.
7292 * features/i386/i386-avx-linux.c: Remove.
7293 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7294 * features/i386/i386-avx-mpx-linux.c: Remove.
7295 * features/i386/i386-linux.c: Remove.
7296 * features/i386/i386-mmx-linux.c: Remove.
7297 * features/i386/i386-mpx-linux.c: Remove.
7299 2017-09-05 Yao Qi <yao.qi@linaro.org>
7301 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7302 (SFILES): Add arch/i386.c.
7303 (HFILES_NO_SRCDIR): Add arch/i386.h.
7304 * arch/i386.c: New file.
7305 * arch/i386.h: New file.
7306 * arch/tdesc.h (allocate_target_description): Declare.
7307 (set_tdesc_architecture): Declare.
7308 (set_tdesc_osabi): Declare.
7309 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7310 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7311 include arch/i386.h.
7312 (i386_linux_read_description): Remove code and call
7313 i386_create_target_description.
7314 (set_tdesc_architecture): New function.
7315 (set_tdesc_osabi): New function.
7316 * target-descriptions.h (allocate_target_description): Remove.
7318 2017-09-05 Yao Qi <yao.qi@linaro.org>
7320 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7321 * target-descriptions.c (tdesc_create_feature): Likewise, and
7323 * features/i386/32bit-avx.c: Re-generated.
7324 * features/i386/32bit-avx512.c: Re-generated.
7325 * features/i386/32bit-core.c: Re-generated.
7326 * features/i386/32bit-linux.c: Re-generated.
7327 * features/i386/32bit-mpx.c: Re-generated.
7328 * features/i386/32bit-pkeys.c: Re-generated.
7329 * features/i386/32bit-sse.c: Re-generated.
7331 2017-09-05 Yao Qi <yao.qi@linaro.org>
7333 * regformats/regdef.h (struct reg): Override operator == and !=.
7335 2017-09-05 Yao Qi <yao.qi@linaro.org>
7337 * arch/tdesc.h: New file.
7338 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7339 * target-descriptions.c: Update comments.
7340 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7342 * features/i386/32bit-avx.c: Re-generated.
7343 * features/i386/32bit-avx512.c: Re-generated.
7344 * features/i386/32bit-core.c: Re-generated.
7345 * features/i386/32bit-linux.c: Re-generated.
7346 * features/i386/32bit-mpx.c: Re-generated.
7347 * features/i386/32bit-pkeys.c: Re-generated.
7348 * features/i386/32bit-sse.c: Re-generated.
7350 2017-09-05 Yao Qi <yao.qi@linaro.org>
7352 * regformats/regdat.sh: Update generated code.
7354 2017-09-05 Yao Qi <yao.qi@linaro.org>
7356 * regformats/regdat.sh: Adjust code order.
7358 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7360 * expprint.c (dump_subexp_body_standard): Use constant format
7361 string in fprintf_filtered call.
7363 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7365 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7367 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7369 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7371 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7373 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7375 * bsd-kvm.o: Define _KMEMUSER.
7376 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7377 * configure: Regenerate.
7379 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7381 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7382 * i386-fbsd-nat.c: Likewise.
7384 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7386 * unittests/array-view-selftests.c: Add include of <array>.
7388 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7390 * spu-tdep.c (flush_ea_cache): Add missing argument to
7391 call_function_by_hand.
7393 2017-09-04 Pedro Alves <palves@redhat.com>
7395 * NEWS (Safer support for debugging with no debug info): New.
7397 2017-09-04 Pedro Alves <palves@redhat.com>
7399 * c-exp.y (function_method, function_method_void): Add current
7400 instance flags to TYPE_INSTANCE.
7401 * dwarf2read.c (check_modifier): New.
7402 (compute_delayed_physnames): Assert that only C++ adds delayed
7403 physnames. Mark fn_fields as const/volatile depending on
7405 * eval.c (make_params): New type_instance_flags parameter. Use
7406 it as the new type's instance flags.
7407 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
7408 flags element and pass it to make_params.
7409 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
7410 instance flags element.
7411 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
7412 * gdbtypes.h: Include "enum-flags.h".
7413 (type_instance_flags): New enum-flags type.
7414 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
7415 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
7416 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
7417 (follow_type_instance_flags): New function.
7418 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
7419 * parser-defs.h (follow_type_instance_flags): Declare.
7420 * valops.c (value_struct_elt_for_reference): const/volatile must
7423 2017-09-04 Pedro Alves <palves@redhat.com>
7425 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
7426 function/method scopes; lookup the nested name as a function local
7429 2017-09-04 Pedro Alves <palves@redhat.com>
7431 (%type <voidval>): Add function_method.
7432 * c-exp.y (exp): New production for calls with no arguments.
7433 (function_method, function_method_void_or_typelist): New
7435 (exp): New production for "method()::static_var".
7436 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
7437 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7438 Handle OP_FUNC_STATIC_VAR.
7439 * parse.c (operator_length_standard):
7440 Handle OP_FUNC_STATIC_VAR.
7442 2017-09-04 Pedro Alves <palves@redhat.com>
7444 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
7446 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7448 * parse.c (operator_length_standard, operator_check_standard):
7450 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
7452 2017-09-04 Pedro Alves <palves@redhat.com>
7454 * ax-gdb.c: Include "typeprint.h".
7455 (gen_expr_for_cast): New function.
7456 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
7457 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
7459 * dwarf2read.c (new_symbol_full): Fallback to int instead of
7460 nodebug_data_symbol.
7461 * eval.c: Include "typeprint.h".
7462 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
7463 Error out if symbol has unknown type.
7464 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
7465 evaluate_subexp_for_cast.
7466 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
7468 (evaluate_subexp_for_cast): New function.
7469 * gdbtypes.c (init_nodebug_var_type): New function.
7470 (objfile_type): Use it to initialize types of variables with no
7472 * typeprint.c (error_unknown_type): New.
7473 * typeprint.h (error_unknown_type): New declaration.
7474 * compile/compile-c-types.c (convert_type_basic): Handle
7475 TYPE_CODE_ERROR; warn and fallback to int for variables with
7478 2017-09-04 Pedro Alves <palves@redhat.com>
7480 * eval.c (evaluate_var_value): New function, factored out from ...
7481 (evaluate_subexp_standard): ... here.
7483 2017-09-04 Pedro Alves <palves@redhat.com>
7485 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
7486 Remove useless assignments to 'op'.
7488 2017-09-04 Pedro Alves <palves@redhat.com>
7490 * eval.c (eval_skip_value): New function.
7491 (evaluate_subexp_standard): Use it.
7493 2017-09-04 Pedro Alves <palves@redhat.com>
7495 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
7496 function name from symbol/minsym and pass it to
7497 error_call_unknown_return_type.
7499 2017-09-04 Pedro Alves <palves@redhat.com>
7501 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
7502 * ax-gdb.c (gen_msym_var_ref): New function.
7503 (gen_expr): Handle OP_VAR_MSYM_VALUE.
7504 * eval.c (evaluate_var_msym_value): New function.
7505 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
7506 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
7507 to call_function_by_hand.
7508 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
7509 Handle OP_VAR_MSYM_VALUE.
7510 (union exp_element) <msymbol>: New field.
7511 * minsyms.h (struct type): Forward declare.
7512 (find_minsym_type_and_address): Declare.
7513 * parse.c (write_exp_elt_msym): New function.
7514 (write_exp_msymbol): Delete, refactored as ...
7515 (find_minsym_type_and_address): ... this new function.
7516 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
7517 (operator_length_standard, operator_check_standard): Handle
7519 * std-operator.def (OP_VAR_MSYM_VALUE): New.
7521 2017-09-04 Pedro Alves <palves@redhat.com>
7523 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
7524 TYPE_GNU_IFUNC specially here. Throw error if return type is
7526 * ada-typeprint.c (print_func_type): Handle functions with unknown
7528 * c-typeprint.c (c_type_print_base): Handle functions and methods
7529 with unknown return type.
7530 * compile/compile-c-symbols.c (convert_symbol_bmsym)
7531 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
7532 * compile/compile-c-types.c: Include "objfiles.h".
7533 (convert_func): For functions with unknown return type, warn and
7535 * compile/compile-object-run.c (compile_object_run): Adjust call
7536 to call_function_by_hand_dummy.
7537 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
7538 call_function_by_hand.
7539 * eval.c (evaluate_subexp_standard): Adjust calls to
7540 call_function_by_hand. Handle functions and methods with unknown
7541 return type. Pass expect_type to call_function_by_hand.
7542 * f-typeprint.c (f_type_print_base): Handle functions with unknown
7544 * gcore.c (call_target_sbrk): Adjust call to
7545 call_function_by_hand.
7546 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
7547 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
7548 an integer address type instead of nodebug.
7549 * guile/scm-value.c (gdbscm_value_call): Adjust call to
7550 call_function_by_hand.
7551 * infcall.c (error_call_unknown_return_type): New function.
7552 (call_function_by_hand): New "default_return_type" parameter.
7554 (call_function_by_hand_dummy): New "default_return_type"
7555 parameter. Use it instead of defaulting to int. If there's no
7556 default and the return type is unknown, throw an error. If
7557 there's a default return type, and the called function has no
7558 debug info, then assume the function is prototyped.
7559 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
7560 New "default_return_type" parameter.
7561 (error_call_unknown_return_type): New declaration.
7562 * linux-fork.c (call_lseek): Cast return type of lseek.
7563 (inferior_call_waitpid, checkpoint_command): Adjust calls to
7564 call_function_by_hand.
7565 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
7566 calls to call_function_by_hand.
7567 * m2-typeprint.c (m2_procedure): Handle functions with unknown
7569 * objc-lang.c (lookup_objc_class, lookup_child_selector)
7570 (value_nsstring, print_object_command): Adjust calls to
7571 call_function_by_hand.
7572 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
7573 functions with unknown return type.
7574 (pascal_type_print_func_varspec_suffix): New function.
7575 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
7576 TYPE_CODE_METHOD>: Use it.
7577 * python/py-value.c (valpy_call): Adjust call to
7578 call_function_by_hand.
7579 * rust-lang.c (rust_evaluate_funcall): Adjust call to
7580 call_function_by_hand.
7581 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
7582 call_function_by_hand.
7583 * valops.c (value_allocate_space_in_inferior): Adjust call to
7584 call_function_by_hand.
7585 * typeprint.c (type_print_unknown_return_type): New function.
7586 * typeprint.h (type_print_unknown_return_type): New declaration.
7588 2017-09-04 Pedro Alves <palves@redhat.com>
7590 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
7591 types with more than one parameter as prototyped.
7593 2017-09-04 Pedro Alves <palves@redhat.com>
7595 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
7596 (disassemble_command): Use gdb_disassembly_flags instead of bare
7598 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
7599 (dump_insns, do_mixed_source_and_assembly_deprecated)
7600 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
7601 Use gdb_disassembly_flags instead of bare int.
7602 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
7603 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
7604 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
7605 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
7606 (enum gdb_disassembly_flag): ... values of this new enumeration.
7607 (gdb_disassembly_flags): Define.
7609 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
7610 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
7611 gdb_disassembly_flags instead of bare int.
7612 * record-btrace.c (btrace_insn_history)
7613 (record_btrace_insn_history, record_btrace_insn_history_range)
7614 (record_btrace_insn_history_from): Use gdb_disassembly_flags
7615 instead of bare int.
7616 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
7617 Use gdb_disassembly_flags instead of bare int.
7618 * target-debug.h (target_debug_print_gdb_disassembly_flags):
7620 * target-delegates.c: Regenerate.
7621 * target.c (target_insn_history, target_insn_history_from)
7622 (target_insn_history_range): Use gdb_disassembly_flags instead of
7624 * target.h: Include "disasm.h".
7625 (struct target_ops) <to_insn_history, to_insn_history_from,
7626 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
7628 (target_insn_history, target_insn_history_from)
7629 (target_insn_history_range): Use gdb_disassembly_flags instead of
7632 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7634 * cli/cli-script.c (build_command_line): For if/while commands,
7635 check whether args is empty.
7637 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7639 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
7640 (enum command_control_type): Likewise.
7641 (struct command_line): Likewise.
7642 (free_command_lines): Likewise.
7643 (struct command_lines_deleter): Likewise.
7644 (command_line_up): Likewise.
7645 (read_command_lines): Likewise.
7646 (read_command_lines_1): Likewise.
7647 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
7648 (enum command_control_type): Likewise.
7649 (struct command_line): Likewise.
7650 (free_command_lines): Likewise.
7651 (struct command_lines_deleter): Likewise.
7652 (command_line_up): Likewise.
7653 (read_command_lines): Likewise.
7654 (read_command_lines_1): Likewise.
7655 * breakpoint.h: Include cli/cli-script.h.
7656 * extension-priv.h: Likewise.
7657 * gdbcmd.h: Likewise.
7659 2017-09-04 Pedro Alves <palves@redhat.com>
7661 * ada-lang.c (is_known_support_routine): Move sal declaration to
7662 where it is initialized.
7663 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
7664 (parse_breakpoint_sals, decode_static_tracepoint_spec)
7665 (clear_command, update_static_tracepoint): Remove init_sal
7666 references. Move declarations closer to initializations.
7667 * cli/cli-cmds.c (list_command): Move sal declarations closer to
7669 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
7670 references. Move sal declarations closer to initializations.
7671 * frame.c (find_frame_sal): Return a symtab_and_line via function
7672 return instead of output parameter. Remove init_sal references.
7673 * frame.h (find_frame_sal): Return a symtab_and_line via function
7674 return instead of output parameter.
7675 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
7676 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
7678 (gdbscm_find_pc_line): Remove init_sal reference.
7679 * infcall.c (call_function_by_hand_dummy): Remove init_sal
7680 references. Move declarations closer to initializations.
7681 * infcmd.c (set_step_frame): Update. Move declarations closer to
7683 (finish_backward): Remove init_sal references. Move declarations
7684 closer to initializations.
7685 * infrun.c (process_event_stop_test, handle_step_into_function)
7686 (insert_hp_step_resume_breakpoint_at_frame)
7687 (insert_step_resume_breakpoint_at_caller): Likewise.
7688 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
7689 (symbol_to_sal): Likewise.
7690 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
7691 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
7692 to its initialization.
7693 * reverse.c (save_bookmark_command): Use new/delete. Remove
7694 init_sal references. Move declarations closer to initializations.
7695 * source.c (get_current_source_symtab_and_line): Remove brace
7697 (set_current_source_symtab_and_line): Now takes the sal by const
7698 reference. Remove brace initialization.
7699 (line_info): Remove init_sal reference.
7700 * source.h (set_current_source_symtab_and_line): Now takes a
7701 symtab_and_line via const reference.
7702 * stack.c (set_current_sal_from_frame): Adjust.
7703 (print_frame_info): Adjust.
7704 (get_last_displayed_sal): Return the sal via function return
7705 instead of via output parameter. Simplify.
7706 (frame_info): Adjust.
7707 * stack.h (get_last_displayed_sal): Return the sal via function
7708 return instead of via output parameter.
7709 * symtab.c (init_sal): Delete.
7710 (find_pc_sect_line): Remove init_sal references. Move
7711 declarations closer to initializations.
7712 (find_function_start_sal): Remove init_sal references. Move
7713 declarations closer to initializations.
7714 * symtab.h (struct symtab_and_line): In-class initialize all
7716 * tracepoint.c (set_traceframe_context)
7717 (print_one_static_tracepoint_marker): Remove init_sal references.
7718 Move declarations closer to initializations.
7719 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
7720 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
7721 declarations closer to initializations.
7722 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
7723 init_sal references. Adjust.
7725 2017-09-04 Pedro Alves <palves@redhat.com>
7727 * ax-gdb.c (agent_command_1): Use range-for.
7728 * break-catch-throw.c (re_set_exception_catchpoint): Update.
7729 * breakpoint.c: Include "common/array-view.h".
7730 (init_breakpoint_sal, create_breakpoint_sal): Change sals
7731 parameter from struct symtabs_and_lines to
7732 array_view<symtab_and_line>. Adjust. Use range-for. Update.
7733 (breakpoint_sals_to_pc): Change sals parameter from struct
7734 symtabs_and_lines to std::vector reference.
7735 (check_fast_tracepoint_sals): Change sals parameter from struct
7736 symtabs_and_lines to std::array_view. Use range-for.
7737 (decode_static_tracepoint_spec): Return a std::vector instead of
7738 symtabs_and_lines. Update.
7739 (create_breakpoint): Update.
7740 (break_range_command, until_break_command, clear_command): Update.
7741 (base_breakpoint_decode_location, bkpt_decode_location)
7742 (bkpt_probe_create_sals_from_location)
7743 (bkpt_probe_decode_location, tracepoint_decode_location)
7744 (tracepoint_probe_decode_location)
7745 (strace_marker_create_sals_from_location): Return a std::vector
7746 instead of symtabs_and_lines.
7747 (strace_marker_create_breakpoints_sal): Update.
7748 (strace_marker_decode_location): Return a std::vector instead of
7749 symtabs_and_lines. Update.
7750 (update_breakpoint_locations): Change struct symtabs_and_lines
7751 parameters to gdb::array_view. Adjust.
7752 (location_to_sals): Return a std::vector instead of
7753 symtabs_and_lines. Update.
7754 (breakpoint_re_set_default): Use std::vector instead of struct
7756 (decode_location_default): Return a std::vector instead of
7757 symtabs_and_lines. Update.
7758 * breakpoint.h: Include "common/array-view.h".
7759 (struct breakpoint_ops) <decode_location>: Now returns a
7760 std::vector instead of returning a symtabs_and_lines via output
7762 (update_breakpoint_locations): Change sals parameters to use
7764 * cli/cli-cmds.c (edit_command, list_command): Update to use
7765 std::vector and gdb::array_view.
7766 (ambiguous_line_spec): Adjust to use gdb::array_view and
7768 (compare_symtabs): Rename to ...
7769 (cmp_symtabs): ... this. Change parameters to symtab_and_line
7770 const reference and adjust.
7771 (filter_sals): Rewrite using std::vector and standard algorithms.
7772 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
7773 (jump_command): Update to use std::vector.
7774 * linespec.c (struct linespec_state) <canonical_names>: Update
7776 (add_sal_to_sals_basic): Delete.
7777 (add_sal_to_sals, filter_results, convert_results_to_lsals)
7778 (decode_line_2, create_sals_line_offset)
7779 (convert_address_location_to_sals, convert_linespec_to_sals)
7780 (convert_explicit_location_to_sals, parse_linespec)
7781 (event_location_to_sals, decode_line_full, decode_line_1)
7782 (decode_line_with_current_source)
7783 (decode_line_with_last_displayed, decode_objc)
7784 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
7785 (linespec_result::~linespec_result): Adjust to use std::vector
7786 instead of symtabs_and_lines.
7787 * linespec.h (linespec_sals::sals): Now a std::vector.
7788 (struct linespec_result): Use std::vector, bool, and in-class
7790 (decode_line_1, decode_line_with_current_source)
7791 (decode_line_with_last_displayed): Return std::vector.
7792 * macrocmd.c (info_macros_command): Use std::vector.
7793 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
7794 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
7796 * probe.h (parse_probes): Return a std::vector.
7797 * python/python.c (gdbpy_decode_line): Use std::vector and
7799 * source.c (select_source_symtab, line_info): Use std::vector.
7800 * stack.c (func_command): Use std::vector.
7801 * symtab.h (struct symtabs_and_lines): Delete.
7802 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
7804 2017-09-04 Pedro Alves <palves@redhat.com>
7806 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7807 unittests/array-view-selftests.c.
7808 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
7809 * common/array-view.h: New file.
7810 * unittests/array-view-selftests.c: New file.
7812 2017-09-04 Pedro Alves <palves@redhat.com>
7814 * cli/cli-cmds.c (edit_command): Pass message to
7815 ambiguous_line_spec.
7816 (list_command): Pass message to ambiguous_line_spec. Say
7817 "first"/"last" instead of "start" and "end" to be consistent with
7819 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
7820 them to print formatted message.
7822 2017-09-04 Pedro Alves <palves@redhat.com>
7824 * btrace.c (ftrace_add_pt): Pass btrace_insn to
7825 ftrace_update_insns by reference instead of pointer.
7827 2017-09-04 Yao Qi <yao.qi@linaro.org>
7829 * i386-go32-tdep.c: Include x86-xstate.h.
7830 (i386_go32_init_abi): Call i386_target_description.
7831 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
7832 if xcr0 is X86_XSTATE_X87_MASK.
7833 * i386-tdep.h (tdesc_i386): Remove the declaration.
7834 (tdesc_i386_mmx): Likewise.
7836 2017-09-04 Yao Qi <yao.qi@linaro.org>
7838 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
7839 X86_XSTATE_SSE_MASK instead of 0.
7841 2017-09-04 Yao Qi <yao.qi@linaro.org>
7843 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
7844 i386_target_description.
7845 * i386-fbsd-nat.c (i386fbsd_read_description): Call
7846 i386_target_description.
7847 * i386-tdep.c (i386_gdbarch_init): Likewise.
7849 2017-09-04 Yao Qi <yao.qi@linaro.org>
7851 * amd64-darwin-tdep.c: Include "x86-xstate.h".
7852 (x86_darwin_init_abi_64): Call amd64_target_description.
7853 * amd64-dicos-tdep.c: Likewise.
7854 * amd64-fbsd-nat.c: Likewise.
7855 * amd64-fbsd-tdep.c: Likewise.
7856 * amd64-nbsd-tdep.c: Likewise.
7857 * amd64-obsd-tdep.c: Likewise.
7858 * amd64-sol2-tdep.c: Likewise.
7859 * amd64-windows-tdep.c: Likewise.
7860 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
7862 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7864 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
7865 (btrace_function) <insn>: Change type to use std::vector.
7866 * btrace.c (ftrace_debug, ftrace_call_num_insn,
7867 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
7868 ftrace_update_insns, ftrace_compute_global_level_offset,
7869 btrace_stitch_bts, btrace_clear, btrace_insn_get,
7870 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
7871 change to std::vector.
7872 (ftrace_update_insns): Adjust to change to std::vector, change
7873 type of INSN parameter.
7874 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
7875 * record-btrace.c (btrace_call_history_insn_range,
7876 btrace_compute_src_line_range,
7877 record_btrace_frame_prev_register): Adjust to change to
7879 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
7880 to change to std::vector.
7882 2017-09-03 Tom Tromey <tom@tromey.com>
7884 * corefile.c (reopen_exec_file): Use std::string.
7886 2017-09-03 Tom Tromey <tom@tromey.com>
7888 * compile/compile.c (compile_register_name_mangled): Return
7890 * compile/compile-loc2c.c (pushf_register_address): Update.
7891 (pushf_register): Update.
7892 * compile/compile-c-types.c (convert_array): Update.
7893 * compile/compile-c-symbols.c (generate_vla_size): Update.
7894 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
7895 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
7896 (convert_one_symbol): Update.
7897 (generate_c_for_for_one_variable): Update.
7898 * compile/compile-c-support.c (c_get_range_decl_name): Return a
7900 (generate_register_struct): Update.
7901 * compile/compile-internal.h (c_get_range_decl_name): Return a
7903 (compile_register_name_mangled): Return std::string.
7905 2017-09-03 Tom Tromey <tom@tromey.com>
7907 * utils.c (perror_string): Return a std::string.
7908 (throw_perror_with_name, perror_warning_with_name): Update.
7910 2017-09-03 Tom Tromey <tom@tromey.com>
7912 * demangle.c (demangle_command): Use std::string,
7915 2017-09-03 Tom Tromey <tom@tromey.com>
7917 * cli/cli-setshow.c (do_set_command): Use std::string.
7919 2017-09-03 Tom Tromey <tom@tromey.com>
7921 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
7923 2017-09-03 Tom Tromey <tom@tromey.com>
7925 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
7927 2017-09-03 Tom Tromey <tom@tromey.com>
7929 * mi/mi-cmd-env.c (env_execute_cli_command): Use
7930 gdb::unique_xmalloc_ptr.
7932 2017-09-03 Tom Tromey <tom@tromey.com>
7934 * thread.c (print_thread_info_1): Use string_printf.
7935 (thread_apply_command, thread_apply_all_command): Use
7938 2017-09-03 Tom Tromey <tom@tromey.com>
7940 * valprint.c (val_print_string): Update.
7941 * gdbcore.h (memory_error_message): Return std::string.
7942 * corefile.c (memory_error_message): Return std::string.
7943 (memory_error): Update.
7944 * breakpoint.c (insert_bp_location): Update.
7946 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7948 * target/waitstatus.h (target_waitstatus_to_string): Change
7949 return type to std::string.
7950 * target/waitstatus.c (target_waitstatus_to_string): Return
7952 * target.h (target_waitstatus_to_string): Remove declaration.
7953 * infrun.c (resume, clear_proceed_status_thread,
7954 print_target_wait_results, do_target_wait, save_waitstatus,
7955 stop_all_threads): Adjust.
7956 * record-btrace.c (record_btrace_wait): Adjust.
7958 (target_debug_print_struct_target_waitstatus_p): Adjust.
7960 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7963 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
7966 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7968 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
7969 for setting/unsetting environment variables on the remote target.
7970 (New remote packets): Add entries for QEnvironmentHexEncoded,
7971 QEnvironmentUnset and QEnvironmentReset.
7972 * common/environ.c (gdb_environ::operator=): Extend method to
7973 handle m_user_set_env_list and m_user_unset_env_list.
7974 (gdb_environ::clear): Likewise.
7975 (match_var_in_string): Change type of first parameter from 'char
7976 *' to 'const char *'.
7977 (gdb_environ::set): Extend method to handle
7978 m_user_set_env_list and m_user_unset_env_list.
7979 (gdb_environ::unset): Likewise.
7980 (gdb_environ::clear_user_set_env): New method.
7981 (gdb_environ::user_set_envp): Likewise.
7982 (gdb_environ::user_unset_envp): Likewise.
7983 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
7984 m_user_unset_env_list on move constructor/assignment.
7985 (unset): Add new default parameter 'update_unset_list = true'.
7986 (clear_user_set_env): New method.
7987 (user_set_envp): Likewise.
7988 (user_unset_envp): Likewise.
7989 (m_user_set_env_list): New std::set.
7990 (m_user_unset_env_list): Likewise.
7991 * common/rsp-low.c (hex2str): New function.
7992 (bin2hex): New overload for bin2hex function.
7993 * common/rsp-low.c (hex2str): New prototype.
7994 (str2hex): New overload prototype.
7995 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
7996 QEnvironmentUnset and QEnvironmentReset.
7997 (remote_protocol_features): Add QEnvironmentHexEncoded,
7998 QEnvironmentUnset and QEnvironmentReset packets.
7999 (send_environment_packet): New function.
8000 (extended_remote_environment_support): Likewise.
8001 (extended_remote_create_inferior): Call
8002 extended_remote_environment_support.
8003 (_initialize_remote): Add QEnvironmentHexEncoded,
8004 QEnvironmentUnset and QEnvironmentReset packet configs.
8005 * unittests/environ-selftests.c (gdb_selftest_env_var):
8007 (test_vector_initialization): New function.
8008 (test_init_from_host_environ): Likewise.
8009 (test_reinit_from_host_environ): Likewise.
8010 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8012 (test_unset_set_empty_vector): Likewise.
8013 (test_vector_clear): Likewise.
8014 (test_std_move): Likewise.
8015 (test_move_constructor):
8016 (test_self_move): Likewise.
8017 (test_set_unset_reset): Likewise.
8018 (run_tests): Rewrite in terms of the functions above.
8020 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
8022 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8023 (adi_available): Use a temp variable of type CORE_ADDR as argument
8024 3 when calling target_auxv_search.
8025 (adi_normalize_address): Use masks and xor operators to calculate
8027 (adi_read_versions, adi_write_versions, adi_print_versions)
8028 (do_examine, do_assign): Use paddress.
8030 2017-08-29 John Baldwin <jhb@FreeBSD.org>
8032 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8033 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8034 out of loop and add supply of FIR.
8035 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8038 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8041 * cli/cli-script.c (define_command): Don't convert command name
8044 2017-08-25 Joel Brobecker <brobecker@adacore.com>
8046 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8047 Update all callers accordingly. Remove all code blocks handling
8048 the case where DISPP is not NULL.
8050 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8053 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8054 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8055 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8057 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8059 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8060 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8061 (read_comp_units_from_section): New parameter abbrev_section, use
8062 read_and_check_comp_unit_head, allocate signatured_type if needed.
8063 (create_all_comp_units): Update read_comp_units_from_section caller.
8065 2017-08-23 Pedro Alves <palves@redhat.com>
8068 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8069 to null_ptid and switch to thread without reading the registers
8070 after adding the inferior.
8072 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8074 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8076 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8077 (compile_to_object): Implement compile_gcc.
8078 (_initialize_compile): Install "set compile-gcc". Initialize
8081 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8083 * compile/compile.c (compile_to_object): Conditionally call
8084 set_verbose. Conditionally call compile or compile_v0.
8086 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
8088 * sparc64-tdep.h: (adi_normalize_address): New export.
8089 * sparc-nat.h: (open_adi_tag_fd): New export.
8090 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8091 * sparc64-linux-tdep.c:
8092 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8093 (sparc64_linux_handle_segmentation_fault): New function.
8094 (sparc64_linux_init_abi): Register
8095 sparc64_linux_handle_segmentation_fault
8096 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8097 (sparc64_addr_bits_remove): New function.
8098 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8099 (MAX_PROC_NAME_SIZE): New macro.
8100 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8101 (sparc64adilist): New variable.
8102 (adi_proc_list): New variable.
8103 (find_adi_info): New function.
8104 (add_adi_info): New function.
8105 (get_adi_info_proc): New function.
8106 (get_adi_info): New function.
8107 (info_adi_command): New function.
8108 (read_maps_entry): New function.
8109 (adi_available): New function.
8110 (adi_normalize_address): New function.
8111 (adi_align_address): New function.
8112 (adi_convert_byte_count): New function.
8113 (adi_tag_fd): New function.
8114 (adi_is_addr_mapped): New function.
8115 (adi_read_versions): New function.
8116 (adi_write_versions): New function.
8117 (adi_print_versions): New function.
8118 (do_examine): New function.
8119 (do_assign): New function.
8120 (adi_examine_command): New function.
8121 (adi_assign_command): New function.
8122 (_initialize_sparc64_adi_tdep): New function.
8124 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8126 * breakpoint.c (breakpoints_info): Rename to ...
8127 (info_breakpoints_command): ... this.
8128 (watchpoints_info): Rename to ...
8129 (info_watchpoints_command): ... this.
8130 (tracepoints_info): Rename to ...
8131 (info_tracepoints_command): ... this.
8132 (_initialize_breakpoint): Adjust.
8133 * dcache.c (dcache_info): Rename to ...
8134 (info_display_command): ... this.
8135 (_initialize_dcache): Adjust.
8136 * frame.h (args_info): Rename to ...
8137 (info_args_command): ... this.
8138 (locals_info): Rename to ...
8139 (info_locals_command): ... this.
8140 * infcmd.c (nofp_registers_info): Rename to ...
8141 (info_registers_command): ... this.
8142 (float_info): Rename to ...
8143 (info_float_command): ... this.
8144 (program_info): Rename to ...
8145 (info_program_command): ... this.
8146 (all_registers_info): Rename to ...
8147 (info_all_registers_command): ... this.
8148 (vector_info): Rename to ...
8149 (info_vector_command): ... this.
8150 (float_info): Rename to ...
8151 (info_float_command): ... this.
8152 (_initialize_infcmd): Adjust.
8153 * inferior.h (term_info): Rename to ...
8154 (info_terminal_command): ... this.
8155 * inflow.c (term_info): Rename to ...
8156 (info_terminal_command): ... this.
8157 (_initialize_inflow): Adjust.
8158 * infrun.c (signals_info): Rename to ...
8159 (info_signals_command): ... this.
8160 (_initialize_infrun): Adjust.
8161 * objc-lang.c (classes_info): Rename to ...
8162 (info_classes_command): ... this.
8163 (selectors_info): Rename to ...
8164 (info_selectors_command): ... this.
8165 (_initialize_objc_language): Adjust.
8166 * printcmd.c (sym_info): Rename to ...
8167 (info_symbol_command): ... this.
8168 (address_info): Rename to ...
8169 (info_address_command): ... this.
8170 (display_info): Rename to ...
8171 (info_display_command): ... this.
8172 (_initialize_printcmd): Adjust.
8173 * reverse.c (bookmarks_info): Rename to ...
8174 (info_breakpoints_command): ... this.
8175 (_initialize_reverse): Adjust.
8176 * ser-go32.c (dos_info): Rename to ...
8177 (info_serial_command): ... this.
8178 (_initialize_ser_dos): Adjust.
8179 * skip.c (skip_info): Rename to ...
8180 (info_skip_command): ... this.
8181 (_initialize_step_skip): Adjust.
8182 * source.c (line_info): Rename to ...
8183 (info_line_command): ... this.
8184 (source_info): Rename to ...
8185 (info_source_command)
8186 * stack.c (frame_info): Rename to ...
8187 (info_frame_command): ... this.
8188 (locals_info): Rename to ...
8189 (info_locals_command): ... this.
8190 (args_info): Rename to ...
8191 (info_args_command): ... this.
8192 (_initialize_stack): Adjust.
8193 * symtab.c (sources_info): Rename to ...
8194 (info_sources_command): ... this.
8195 (variables_info): Rename to ...
8196 (info_variables_command): ... this.
8197 (functions_info): Rename to ...
8198 (info_functions_command): ... this.
8199 (types_info): Rename to ...
8200 (info_types_command): ... this.
8201 (_initialize_symtab): Adjust.
8202 * target.c (target_info): Rename to ...
8203 (info_target_command): ... this.
8204 (initialize_targets): Adjust.
8205 * tracepoint.c (tvariables_info): Rename to ...
8206 (info_tvariables_command): ... this.
8207 (scope_info): Rename to ...
8208 (info_scope_command): ... this.
8209 (trace_dump_actions): Adjust.
8210 (_initialize_tracepoint): Adjust.
8212 2017-08-22 Tom Tromey <tom@tromey.com>
8214 * breakpoint.h (install_breakpoint): Update.
8215 * breakpoint.c (add_solib_catchpoint): Update.
8216 (install_breakpoint): Change argument to a std::unique_ptr.
8217 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8218 (create_breakpoint_sal, create_breakpoint): Update.
8219 (watch_command_1, catch_exec_command_1)
8220 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8221 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8222 Return the breakpoint.
8223 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8224 (new_single_step_breakpoint): Update.
8225 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8227 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8229 * break-catch-sig.c (create_signal_catchpoint): Use
8231 * ada-lang.c (create_ada_exception_catchpoint): Use
8234 2017-08-22 Tom Tromey <tom@tromey.com>
8236 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8238 2017-08-22 Tom Tromey <tom@tromey.com>
8240 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8241 (lookup_partial_symbol): Update.
8243 2017-08-22 Tom Tromey <tom@tromey.com>
8245 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8246 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8247 (find_and_open_source, symtab_to_fullname): Update.
8248 * psymtab.c (psymtab_to_fullname): Update.
8250 2017-08-22 Tom Tromey <tom@tromey.com>
8252 * exec.c (exec_file_attach): Update.
8253 * linux-thread-db.c (try_thread_db_load): Update.
8254 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8255 * utils.c (gdb_realpath): Change return type.
8256 (gdb_realpath_keepfile): Update.
8257 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8258 (_initialize_utils): Register the new self test.
8259 * source.c (openp): Update.
8260 (find_and_open_source): Update.
8261 * nto-tdep.c (nto_find_and_open_solib): Update.
8262 * main.c (set_gdb_data_directory): Update.
8263 (captured_main_1): Update.
8264 * dwarf2read.c (dwarf2_get_dwz_file): Update
8265 (dw2_map_symbol_filenames): Update.
8266 * auto-load.c (auto_load_safe_path_vec_update): Update.
8267 (filename_is_in_auto_load_safe_path_vec): Change type of
8269 (auto_load_objfile_script): Update.
8270 (file_is_auto_load_safe): Update. Use std::string.
8271 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8273 2017-08-22 Tom Tromey <tom@tromey.com>
8275 * utils.c (gdb_realpath_keepfile): Return a
8276 gdb::unique_xmalloc_ptr.
8277 * exec.c (exec_file_attach): Update.
8278 * utils.h (gdb_realpath_keepfile): Return a
8279 gdb::unique_xmalloc_ptr.
8281 2017-08-22 Tom Tromey <tom@tromey.com>
8283 * compile/compile.c (compile_file_command): Use
8284 gdb::unique_xmalloc_ptr, std::string.
8285 * utils.c (gdb_abspath): Change return type.
8286 * source.c (openp): Update.
8287 * objfiles.c (allocate_objfile): Update.
8288 * main.c (set_gdb_data_directory): Update.
8289 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8291 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8293 * cli-cmds.c (list_commands): List actual code around more than
8296 2017-08-21 John Baldwin <jhb@FreeBSD.org>
8298 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8300 2017-08-21 Pedro Alves <palves@redhat.com>
8303 * c-exp.y (variable production): Handle function aliases.
8304 * minsyms.c (msymbol_is_text): New function.
8305 * minsyms.h (msymbol_is_text): Declare.
8306 * symtab.c (find_function_alias_target): New function.
8307 * symtab.h (find_function_alias_target): Declare.
8309 2017-08-21 Pedro Alves <palves@redhat.com>
8311 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8313 * typeprint.c (whatis_exp): If handling "whatis", and expression
8314 is OP_TYPE, strip one typedef level. Otherwise don't strip
8316 * valops.c (value_cast): Save "to" type before resolving
8317 stubs/typedefs. Use that type as resulting value's type.
8319 2017-08-18 Tom Tromey <tom@tromey.com>
8320 Pedro Alves <palves@redhat.com>
8322 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8323 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8324 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8325 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8326 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8327 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8328 (linux_get_siginfo_data): Add "thread" argument. Use
8330 * linux-nat.c (linux_child_follow_fork)
8331 (check_stopped_by_watchpoint): Use scoped_restore.
8332 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8333 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8334 (restore_inferior_ptid, save_inferior_ptid): Remove.
8335 * btrace.c (btrace_fetch): Use scoped_restore.
8336 * bsd-uthread.c (bsd_uthread_fetch_registers)
8337 (bsd_uthread_store_registers): Use scoped_restore.
8338 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8340 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8341 (aix_thread_xfer_partial): Use scoped_restore.
8342 * inferior.h (save_inferior_ptid): Remove.
8344 2017-08-18 Yao Qi <yao.qi@linaro.org>
8347 * arm-tdep.c (gdb_print_insn_arm): Mark
8348 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8350 2017-08-18 Yao Qi <yao.qi@linaro.org>
8352 * NEWS: Mention GDBserver's new option "--selftest".
8353 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8354 * selftest.c: Move it to common/selftest.c.
8355 * selftest.h: Move it to common/selftest.h.
8356 * selftest-arch.c (reset): New function.
8357 (tests_with_arch): Call reset.
8359 2017-08-18 Yao Qi <yao.qi@linaro.org>
8361 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8362 instead of exception_fprintf and printf_filtered.
8364 2017-08-18 Yao Qi <yao.qi@linaro.org>
8366 * selftest.c (register_self_test): Rename it to
8367 selftests::register_test.
8368 (run_self_tests): selftest::run_tests.
8369 * selftest.h: Update declarations.
8370 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8371 selftests::register_test_foreach_arch.
8372 * selftest-arch.h: Update declaration.
8373 * aarch64-tdep.c: Update.
8374 * arm-tdep.c: Likewise.
8375 * disasm-selftests.c: Likewise.
8376 * dwarf2loc.c: Likewise.
8377 * dwarf2-frame.c: Likewise.
8378 * findvar.c: Likewise.
8379 * gdbarch-selftests.c: Likewise.
8380 * maint.c (maintenance_selftest): Likewise.
8381 * regcache.c: Likewise.
8382 * rust-exp.y: Likewise.
8383 * selftest-arch.c: Likewise.
8384 * unittests/environ-selftests.c: Likewise.
8385 * unittests/function-view-selftests.c: Likewise.
8386 * unittests/offset-type-selftests.c: Likewise.
8387 * unittests/optional-selftests.c: Likewise.
8388 * unittests/scoped_restore-selftests.c: Likewise.
8389 * utils-selftests.c: Likewise.
8391 2017-08-17 Pedro Alves <palves@redhat.com>
8393 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8396 2017-08-17 Pedro Alves <palves@redhat.com>
8398 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
8400 (reset_die_in_process): Delete, replaced by ...
8401 (process_die_scope): ... this new class. Make it responsible for
8402 freeing cu->line_header too.
8403 (process_die): Use process_die_scope.
8404 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
8405 cu->line_header_die_owner. Don't release the line header if it's
8407 (setup_type_unit_groups): Make the CU/DIE own the line header.
8408 Don't release the line header here.
8410 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
8412 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
8414 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
8416 * NEWS: Mention new shortcuts for nexti and stepi in TUI
8419 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
8421 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
8424 2017-08-15 Stafford Horne <shorne@gmail.com>
8426 * MAINTAINERS (Write After Approval): Add Stafford Horne.
8428 2017-08-15 Stafford Horne <shorne@gmail.com>
8430 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
8432 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
8435 * infcmd.c (unset_environment_command): Use the 'clear' method on
8436 the environment instead of resetting it.
8438 2017-08-15 John Baldwin <jhb@FreeBSD.org>
8440 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
8443 2017-08-14 Tom Tromey <tom@tromey.com>
8445 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
8446 (print_binary_chars): Likewise.
8447 (BITS_IN_BYTES): Remove.
8449 2017-08-14 Tom Tromey <tom@tromey.com>
8452 * valprint.c (LOW_ZERO): Change value to 034.
8453 (print_octal_chars): Add static_asserts for octal constants.
8454 * printcmd.c (print_scalar_formatted): Add 'd' case.
8456 2017-08-11 Tom Tromey <tom@tromey.com>
8458 * symfile.c (add_symbol_file_command): Use std::vector.
8460 2017-08-14 Tom Tromey <tom@tromey.com>
8462 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
8463 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8465 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
8467 2017-08-11 Pedro Alves <palves@redhat.com>
8469 * infrun.c (process_event_stop_test): Adjust
8470 function_name_is_marked_for_skip call.
8471 * skip.c: Include <list>.
8472 (skiplist_entry): Make it a class with private fields, and
8474 (skiplist_entry_chain): Delete.
8475 (skiplist_entries): New.
8476 (skiplist_entry_count): Delete.
8477 (highest_skiplist_entry_num): New.
8478 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
8479 (add_skiplist_entry): Delete.
8480 (skiplist_entry::skiplist_entry): New.
8481 (skiplist_entry::add_entry): New.
8482 (skip_file_command, skip_function): Adjust.
8483 (compile_skip_regexp): Delete.
8484 (skip_command): Don't compile regexp here. Adjust to use
8485 skiplist_entry::add_entry.
8486 (skip_info): Adjust to use range-for and getters.
8487 (skip_enable_command, skip_disable_command): Adjust to use
8488 range-for and setters.
8489 (skip_delete_command): Adjust to use std::list.
8490 (add_skiplist_entry): Delete.
8491 (skip_file_p): Delete, refactored as ...
8492 (skiplist_entry::do_skip_file_p): ... this new method.
8493 (skip_gfile_p): Delete, refactored as ...
8494 (skiplist_entry::do_gskip_file_p): ... this new method.
8495 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
8496 (skiplist_entry::skip_function_p): ... this new method.
8497 (function_name_is_marked_for_skip): Now returns bool, and takes
8498 the function sal by const reference. Adjust to use range-for and
8499 skiplist_entry methods.
8500 (_initialize_step_skip): Remove references to
8501 skiplist_entry_chain, skiplist_entry_count.
8502 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
8503 takes the function sal by const reference.
8505 2017-08-11 Yao Qi <yao.qi@linaro.org>
8507 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
8508 (dwarf2_frame_cache): Remove reset_cache_cleanup.
8509 (dwarf2_frame_cache):
8510 * frame-unwind.c (frame_unwind_try_unwinder): Catch
8511 RETURN_MASK_ALL and set *this_case to NULL.
8512 * frame-unwind.h: Update comments.
8514 2017-08-11 Yao Qi <yao.qi@linaro.org>
8516 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
8517 (dwarf2_frame_state_copy_regs): Remove.
8518 (dwarf2_frame_state_free_regs): Remove.
8519 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
8520 (dwarf2_restore_rule): Call method .alloc_regs instead of
8521 dwarf2_frame_state_alloc_regs.
8522 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
8523 constructor. Call std::move.
8524 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
8525 (dwarf2_frame_cache): Likewise.
8527 [GDB_SELF_TEST]: Include selftest.h and
8529 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
8530 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
8531 execute_cfa_program_test.
8533 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
8534 copy ctor, assignment operator, move assignment.
8535 <alloc_regs>: New method.
8537 (struct dwarf2_frame_state): Delete dtor.
8538 (dwarf2_frame_state_alloc_regs): Remove declaration.
8539 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
8540 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
8542 2017-08-11 Yao Qi <yao.qi@linaro.org>
8544 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
8545 (dwarf2_frame_state::dwarf2_frame_state): New.
8546 (dwarf2_frame_state::~dwarf2_frame_state): New.
8547 (dwarf2_fetch_cfa_info): Update.
8548 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
8549 rather than a pointer. Update code.
8550 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
8552 <data_align, code_align, retaddr_column>: Change them to const.
8553 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
8556 2017-08-11 Yao Qi <yao.qi@linaro.org>
8558 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
8559 <loc.exp>: New field.
8560 * dwarf2-frame.c (execute_cfa_program): Update.
8561 (dwarf2_frame_prev_register): Update.
8563 2017-08-10 Pedro Alves <palves@redhat.com>
8565 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
8567 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8569 * fbsd-nat.c (struct fbsd_fork_info): Remove.
8570 (fbsd_pending_children): Use std::list.
8571 (fbsd_remember_child): Likewise.
8572 (fbsd_is_child_pending): Likewise.
8573 (fbsd_pending_vfork_done): Use std::forward_list.
8574 (fbsd_add_vfork_done): Likewise.
8575 (fbsd_is_vfork_done_pending): Likewise.
8576 (fbsd_next_vfork_done): Likewise.
8578 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8580 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
8581 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
8582 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
8584 (fbsd_xfer_partial): Use gdb::byte_vector.
8585 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
8587 2017-08-09 John Baldwin <jhb@FreeBSD.org>
8589 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
8591 (fbsd_find_memory_regions): Fix `mapfile' initialization.
8593 2017-08-09 Tom Tromey <tom@tromey.com>
8595 * skip.c (skiplist_entry): New constructor.
8596 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
8597 (skiplist_entry::file_is_glob): Now bool.
8598 (skiplist_entry::file, skiplist_entry::function): Now
8600 (make_skip_entry): Return a unique_ptr. Use new.
8601 (free_skiplist_entry, free_skiplist_entry_cleanup)
8602 (make_free_skiplist_entry_cleanup): Remove.
8603 (skip_command, skip_disable_command, add_skiplist_entry)
8604 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
8605 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
8606 (function_name_is_marked_for_skip): Update.
8607 (skip_delete_command): Update. Use delete.
8609 2017-08-09 Jiong Wang <jiong.wang@arm.com>
8611 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
8612 (aarch64_linux_core_read_description): New function.
8613 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
8615 2017-08-09 Pedro Alves <palves@redhat.com>
8617 * cp-name-parser.y (cp_comp_to_string): Return a
8618 gdb::unique_xmalloc_ptr<char>.
8619 * cp-support.c (replace_typedefs_qualified_name)
8620 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
8621 (cp_canonicalize_string_full): Use op= instead of explicit
8623 (cp_class_name_from_physname, method_name_from_physname)
8624 (cp_func_name, cp_remove_params): Adjust to use
8625 gdb::unique_xmalloc_ptr<char>.
8626 * cp-support.h (cp_comp_to_string): Return a
8627 gdb::unique_xmalloc_ptr<char>.
8628 * python/py-type.c (typy_lookup_type): Adjust to use
8629 gdb::unique_xmalloc_ptr<char>.
8631 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
8633 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
8635 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
8636 Yao Qi <yao.qi@linaro.org>
8638 * cp-support.c (cp_canonicalize_string_full): Use
8639 gdb::unique_xmalloc_ptr<char>.
8640 (cp_canonicalize_string): Likewise.
8642 2017-08-09 Yao Qi <yao.qi@linaro.org>
8644 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
8645 * regformats/i386/amd64-avx-avx512.dat: Remove.
8646 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
8647 * regformats/i386/amd64-avx-mpx.dat:Remove.
8648 * regformats/i386/amd64-avx.dat: Remove.
8649 * regformats/i386/amd64-mpx.dat: Remove.
8650 * regformats/i386/i386-avx-avx512.dat: Remove.
8651 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
8652 * regformats/i386/i386-avx-mpx.dat: Remove.
8653 * regformats/i386/i386-mmx.dat: Remove.
8654 * regformats/i386/i386-mpx.dat: Remove.
8656 2017-08-09 Yao Qi <yao.qi@linaro.org>
8658 * amd64-tdep.h (tdesc_x32): Remove the declaration.
8659 * amd64-tdep.c: Don't include features/i386/x32*.c.
8660 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
8662 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
8663 and i386/x32-avx-avx512.
8664 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
8666 * features/i386/x32-avx-avx512.c: Removed.
8667 * features/i386/x32-avx-avx512.xml: Removed.
8668 * features/i386/x32-avx.c: Removed.
8669 * features/i386/x32-avx.xml: Removed.
8670 * features/i386/x32.c: Removed.
8671 * features/i386/x32.xml: Removed.
8672 * regformats/i386/x32-avx-avx512.dat: Removed.
8673 * regformats/i386/x32-avx.dat: Removed.
8674 * regformats/i386/x32.dat: Removed.
8676 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8678 PR breakpoints/21886
8679 * mem-break.c (default_memory_insert_breakpoint): Use
8680 `->placed_address' rather than `->reqstd_address' for the
8681 breakpoint location.
8683 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8685 * arch-utils.c (default_print_insn): Remove arch/mach/endian
8688 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
8690 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
8691 a union of `tdep_info', `tdesc_data' and `id'.
8692 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
8693 rather than `info.tdep_info'.
8694 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
8695 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8696 * i386-tdep.c (i386_gdbarch_init): Likewise.
8697 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
8698 * mips-tdep.c (mips_gdbarch_init): Likewise.
8699 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8700 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8701 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
8703 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
8705 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8706 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
8708 * spu-tdep.c (spu_gdbarch_init): Likewise.
8709 * gdbarch.h: Regenerate.
8711 2017-08-07 Leszek Swirski <leszeks@google.com>
8714 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
8716 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
8718 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
8719 (gdbsim_open): Rename gdb_argv args object to argv.
8721 2017-08-05 Tom Tromey <tom@tromey.com>
8723 * compile/compile-object-load.c (compile_object_load): Use
8724 gdb::unique_xmalloc_ptr.
8725 * cli/cli-dump.c (scan_filename): Rename from
8726 scan_filename_with_cleanup. Change return type.
8727 (scan_expression): Rename from scan_expression_with_cleanup.
8729 (dump_memory_to_file, dump_value_to_file, restore_command):
8730 Use gdb::unique_xmalloc_ptr. Update.
8731 * cli/cli-cmds.c (find_and_open_script): Use
8732 gdb::unique_xmalloc_ptr.
8733 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
8734 * symmisc.c (maintenance_print_symbols)
8735 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
8736 * symfile.c (symfile_bfd_open, generic_load)
8737 (add_symbol_file_command, remove_symbol_file_command): Use
8738 gdb::unique_xmalloc_ptr.
8739 * source.c (openp): Use gdb::unique_xmalloc_ptr.
8740 * psymtab.c (maintenance_print_psymbols): Use
8741 gdb::unique_xmalloc_ptr.
8742 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
8743 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
8744 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
8745 (reload_shared_libraries_1): Likewise.
8747 2017-08-05 Tom Tromey <tom@tromey.com>
8749 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
8750 (rust_op_vector, rust_set_vector): New typedefs.
8751 (current_parser): New global.
8752 (work_obstack): Change to pointer type. Update all users.
8753 (rust_ast, pstate): Remove globals.
8754 (struct rust_parser): New.
8755 (%union) <params, field_inits>: Change type.
8756 (start, tuple_expr, unit_expr, struct_expr_list, literal)
8757 (field_expr, expr_list, maybe_expr_list, type_list): Update.
8758 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
8759 (convert_params_to_types, convert_params_to_expression): Change
8761 (ast_string): Change type of "fields".
8762 (rust_parse): Make a rust_parser. Remove cleanups.
8763 (rust_lex_tests): Make and install an auto_obstack.
8765 2017-08-04 Yao Qi <yao.qi@linaro.org>
8767 * configure.srv (ipa_x32_linux_regobj): New.
8768 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
8769 instead of X86_TDESC_AVX512.
8770 (initialize_low_tracepoint): Call
8771 init_registers_x32_avx_avx512_linux.
8773 2017-08-04 Yao Qi <yao.qi@linaro.org>
8775 * utils.h (gdb_argv): Add namespace std for nullptr_t.
8777 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
8779 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
8781 2017-08-03 Tom Tromey <tom@tromey.com>
8783 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
8785 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
8787 2017-08-03 Tom Tromey <tom@tromey.com>
8789 * python/py-param.c (compute_enum_values): Use gdb_argv.
8791 2017-08-03 Tom Tromey <tom@tromey.com>
8793 * utils.h (struct gdb_argv_deleter): New.
8794 (gdb_argv): New class.
8795 * utils.c (gdb_argv::reset): New method.
8796 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
8797 * tracefile.c (tsave_command): Use gdb_argv.
8798 * top.c (new_ui_command): Use gdb_argv.
8799 * symmisc.c (maintenance_print_symbols)
8800 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
8801 * symfile.c (symbol_file_command, generic_load)
8802 (remove_symbol_file_command): Use gdb_argv.
8803 * stack.c (backtrace_command): Use gdb_argv.
8804 * source.c (add_path, show_substitute_path_command)
8805 (unset_substitute_path_command, set_substitute_path_command):
8807 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
8808 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
8809 * remote.c (extended_remote_run, remote_put_command)
8810 (remote_get_command, remote_delete_command): Use gdb_argv.
8811 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
8812 (gdbsim_open): Use gdb_argv.
8813 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
8814 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
8815 * procfs.c (procfs_info_proc): Use gdb_argv.
8816 * interps.c (interpreter_exec_cmd): Use gdb_argv.
8817 * infrun.c (handle_command): Use gdb_argv.
8818 * inferior.c (add_inferior_command, clone_inferior_command):
8820 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
8821 * exec.c (exec_file_command): Use gdb_argv.
8822 * cli/cli-cmds.c (alias_command): Use gdb_argv.
8823 * compile/compile.c (build_argc_argv): Use gdb_argv.
8825 2017-08-03 Tom Tromey <tom@tromey.com>
8827 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
8829 2017-08-03 Tom Tromey <tom@tromey.com>
8831 * python/python.c (compute_python_string): Return std::string.
8832 (gdbpy_eval_from_control_command): Update.
8833 (do_start_initialization): Use std::string.
8834 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
8836 * python/py-breakpoint.c (local_setattro): Use string_printf, not
8839 2017-08-03 Tom Tromey <tom@tromey.com>
8841 * top.h (do_restore_instream_cleanup): Remove.
8842 * top.c (do_restore_instream_cleanup): Remove.
8843 (read_command_file): Use scoped_restore.
8844 * cli/cli-script.c (execute_user_command): Use scoped_restore.
8846 2017-08-03 Tom Tromey <tom@tromey.com>
8848 * cli/cli-script.c (execute_user_command)
8849 (execute_control_command): Use scoped_restore.
8851 2017-08-03 Tom Tromey <tom@tromey.com>
8853 * cli/cli-script.c (do_restore_user_call_depth): Remove.
8854 (execute_user_command): Remove user_call_depth; use
8855 user_args_stack's size instead.
8857 2017-08-03 Tom Tromey <tom@tromey.com>
8859 * top.h (in_user_command): Remove.
8860 * top.c (in_user_command): Remove.
8861 * cli/cli-script.c (do_restore_user_call_depth)
8862 (execute_user_command): Update.
8864 2017-08-03 Tom Tromey <tom@tromey.com>
8866 * valops.c (search_struct_method): Use gdb::byte_vector.
8867 * valarith.c (value_concat): Use std::vector.
8868 * target.c (memory_xfer_partial): Use gdb::byte_vector.
8869 (simple_search_memory): Likewise.
8870 * printcmd.c (find_string_backward): Use gdb::byte_vector.
8871 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
8872 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
8873 * elfread.c (elf_rel_plt_read): Use std::string.
8874 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
8875 * cli/cli-dump.c (restore_section_callback): Use
8878 2017-08-03 Tom Tromey <tom@tromey.com>
8880 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
8882 2017-08-03 Tom Tromey <tom@tromey.com>
8884 * tui/tui-regs.c (tui_restore_gdbout): Remove.
8885 (tui_register_format): Use scoped_restore.
8887 2017-08-03 Tom Tromey <tom@tromey.com>
8889 * reverse.c (exec_direction_default): Remove.
8890 (exec_reverse_once): Use scoped_restore.
8891 * remote.c (restore_remote_timeout): Remove.
8892 (remote_flash_erase, remote_flash_write, remote_flash_done)
8893 (readchar, remote_serial_write): Use scoped_restore.
8894 * cli/cli-script.c (struct source_cleanup_lines_args)
8895 (source_cleanup_lines): Remove.
8896 (script_from_file): Use scoped_restore.
8897 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
8898 (source_command): Use scoped_restore.
8900 2017-08-03 Tom Tromey <tom@tromey.com>
8902 * utils.h (make_cleanup_free_so): Remove.
8903 * utils.c (do_free_so, make_cleanup_free_so): Remove.
8904 * solist.h (struct so_deleter): New.
8905 (so_list_up): New typedef.
8906 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
8908 2017-08-03 Tom Tromey <tom@tromey.com>
8910 * utils.h (make_cleanup_restore_current_language): Remove.
8911 * utils.c (do_restore_current_language)
8912 (make_cleanup_restore_current_language): Remove.
8913 * parse.c (parse_exp_in_context_1)
8914 (parse_expression_with_language): Use
8915 scoped_restore_current_language.
8916 * mi/mi-main.c (mi_cmd_execute): Use
8917 scoped_restore_current_language.
8918 * language.h (scoped_restore_current_language): New class.
8920 2017-08-03 Tom Tromey <tom@tromey.com>
8922 * compile/compile.c (cleanup_unlink_file): Remove.
8923 (compile_to_object): Use gdb::unlinker.
8924 (eval_compile_command): Likewise.
8926 2017-08-03 Tom Tromey <tom@tromey.com>
8928 * utils.h (make_cleanup_fclose): Remove.
8929 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
8931 2017-08-03 Tom Tromey <tom@tromey.com>
8933 * top.c (open_terminal_stream): Return gdb_file_up.
8934 (new_ui_command): Update.
8936 2017-08-03 Tom Tromey <tom@tromey.com>
8938 * source.c (print_source_lines_base, forward_search_command)
8939 (reverse_search_command): Use gdb_file_up.
8941 2017-08-03 Tom Tromey <tom@tromey.com>
8943 * fbsd-nat.c (fbsd_find_memory_regions): Update.
8945 2017-08-03 Tom Tromey <tom@tromey.com>
8947 * cli/cli-cmds.c (find_and_open_script): Change return type.
8948 Remove "streamp" and "full_path" parameters.
8949 (source_script_with_search): Update.
8950 * auto-load.c (source_script_file): Update.
8951 * cli/cli-cmds.h (find_and_open_script): Change type.
8952 (open_script): New struct.
8954 2017-08-03 Tom Tromey <tom@tromey.com>
8956 * xml-support.c (xml_fetch_content_from_file): Update.
8957 * ui-file.c (stdio_file::open): Update.
8958 * tracefile-tfile.c (tfile_start): Update.
8959 * remote.c (remote_file_put, remote_file_get): Update.
8960 * nat/linux-procfs.c (linux_proc_get_int)
8961 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
8962 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
8963 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
8964 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
8965 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
8966 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
8967 * linux-nat.c (linux_proc_pending_signals): Update.
8968 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
8969 (file_closer): Remove.
8970 * compile/compile.c (compile_to_object): Update.
8971 * common/filestuff.h (struct gdb_file_deleter): New.
8972 (gdb_file_up): New typedef.
8973 (gdb_fopen_cloexec): Change return type.
8974 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
8975 * cli/cli-dump.c (fopen_with_cleanup): Remove.
8976 (dump_binary_file, restore_binary_file): Update.
8977 * auto-load.c (auto_load_objfile_script_1): Update.
8979 2017-08-03 Tom Tromey <tom@tromey.com>
8981 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
8982 (info_static_tracepoint_markers_command): Likewise.
8983 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
8984 * skip.c (skip_info): Use ui_out_emit_table.
8985 * progspace.c (print_program_space): Use ui_out_emit_table.
8986 * osdata.c (info_osdata): Use ui_out_emit_table.
8987 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
8989 * linux-thread-db.c (info_auto_load_libthread_db): Use
8991 * inferior.c (print_inferior): Use ui_out_emit_table.
8992 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
8993 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
8994 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
8995 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
8996 * ui-out.h (class ui_out_emit_table): New.
8998 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9000 * mips-tdep.c (mips_fpu_type_str): New function.
9001 (mips_dump_tdep): Call it.
9003 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9005 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9008 2017-07-31 Xavier Roirand <roirand@adacore.com>
9010 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9012 2017-07-27 Xavier Roirand <roirand@adacore.com>
9014 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9016 2017-07-26 Yao Qi <yao.qi@linaro.org>
9018 * cli/cli-cmds.c (maintenancechecklist): New variable.
9019 * gdbcmd.h (maintenancechecklist): Declare it.
9020 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9021 Call i386_linux_read_description with different masks.
9022 * maint.c (maintenance_check_command): New function.
9023 (_initialize_maint_cmds): Call add_prefix_cmd.
9024 * target-descriptions.c (tdesc_reg): override operator != and ==.
9025 (tdesc_type): Likewise.
9026 (tdesc_feature): Likewise.
9027 (target_desc): Likewise.
9028 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9029 (maintenance_check_xml_descriptions): New function.
9030 (_initialize_target_descriptions) Add command "xml-descriptions".
9031 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9033 2017-07-26 Yao Qi <yao.qi@linaro.org>
9035 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9036 Include features/i386/32bit-*.c.
9037 (i386_linux_read_description): Generate target description if it
9039 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9041 * features/i386/32bit-linux.c: Re-generated.
9042 * features/i386/32bit-sse.c: Likewise.
9043 * target-descriptions.c (print_c_feature::visit): Print code to
9044 set register number if needed.
9045 (print_c_feature) <m_next_regnum>: New field.
9047 2017-07-26 Yao Qi <yao.qi@linaro.org>
9049 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9050 (FEATURE_XMLFILES): New.
9051 (FEATURE_CFILES): New.
9053 (clean-cfiles): Remove generated c files.
9054 * features/i386/32bit-avx.c: Generated.
9055 * features/i386/32bit-avx512.c: Generated.
9056 * features/i386/32bit-core.c: Generated.
9057 * features/i386/32bit-linux.c: Generated.
9058 * features/i386/32bit-mpx.c: Generated.
9059 * features/i386/32bit-pkeys.c: Generated.
9060 * features/i386/32bit-sse.c: Generated.
9061 * target-descriptions.c: Include algorithm.
9062 (tdesc_element_visitor): Add method visit_end.
9063 (print_c_tdesc): Implement visit_end.
9064 (print_c_tdesc:: m_filename_after_features): Move it to
9066 (print_c_feature): New class.
9067 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9068 name starts with "i386/32bit-".
9070 2017-07-26 Yao Qi <yao.qi@linaro.org>
9072 * target-descriptions.c (tdesc_element_visitor): New class.
9073 (tdesc_element): New class.
9074 (tdesc_reg): Inherit from tdesc_element.
9075 (tdesc_reg::accept): New function.
9076 (tdesc_type): Inherit from tdesc_element.
9077 (tdesc_type::accept): New function.
9078 (tdesc_feature): Inherit from tdesc_element.
9079 (tdesc_feature::accept): New function.
9080 (target_desc): Inherit from tdesc_element.
9081 (target_desc::target_desc): New.
9082 (target_desc::~target_desc): New.
9083 (target_desc::accept): New.
9084 (allocate_target_description): Use new.
9085 (free_target_description): Use delete.
9086 (print_c_tdesc): New class.
9087 (maint_print_c_tdesc_cmd): Adjust.
9089 * features/aarch64.c: Re-generated.
9090 * features/arc-arcompact.c: Re-generated.
9091 * features/arc-v2.c: Re-generated.
9092 * features/arm/arm-with-iwmmxt.c: Re-generated.
9093 * features/arm/arm-with-m.c: Re-generated.
9094 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9095 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9096 * features/arm/arm-with-neon.c: Re-generated.
9097 * features/arm/arm-with-vfpv2.c: Re-generated.
9098 * features/arm/arm-with-vfpv3.c: Re-generated.
9099 * features/i386/amd64-avx-avx512.c: Re-generated.
9100 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9101 * features/i386/amd64-avx.c: Re-generated.
9102 * features/i386/amd64-avx-linux.c: Re-generated.
9103 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9104 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9105 * features/i386/amd64-avx-mpx.c: Re-generated.
9106 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9107 * features/i386/amd64.c: Re-generated.
9108 * features/i386/amd64-linux.c: Re-generated.
9109 * features/i386/amd64-mpx.c: Re-generated.
9110 * features/i386/amd64-mpx-linux.c: Re-generated.
9111 * features/i386/i386-avx-avx512.c: Re-generated.
9112 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9113 * features/i386/i386-avx.c: Re-generated.
9114 * features/i386/i386-avx-linux.c: Re-generated.
9115 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9116 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9117 * features/i386/i386-avx-mpx.c: Re-generated.
9118 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9119 * features/i386/i386.c: Re-generated.
9120 * features/i386/i386-linux.c: Re-generated.
9121 * features/i386/i386-mmx.c: Re-generated.
9122 * features/i386/i386-mmx-linux.c: Re-generated.
9123 * features/i386/i386-mpx.c: Re-generated.
9124 * features/i386/i386-mpx-linux.c: Re-generated.
9125 * features/i386/x32-avx-avx512.c: Re-generated.
9126 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9127 * features/i386/x32-avx.c: Re-generated.
9128 * features/i386/x32-avx-linux.c: Re-generated.
9129 * features/i386/x32.c: Re-generated.
9130 * features/i386/x32-linux.c: Re-generated.
9131 * features/microblaze.c: Re-generated.
9132 * features/microblaze-with-stack-protect.c: Re-generated.
9133 * features/mips64-dsp-linux.c: Re-generated.
9134 * features/mips64-linux.c: Re-generated.
9135 * features/mips-dsp-linux.c: Re-generated.
9136 * features/mips-linux.c: Re-generated.
9137 * features/nds32.c: Re-generated.
9138 * features/nios2.c: Re-generated.
9139 * features/nios2-linux.c: Re-generated.
9140 * features/rs6000/powerpc-32.c: Re-generated.
9141 * features/rs6000/powerpc-32l.c: Re-generated.
9142 * features/rs6000/powerpc-403.c: Re-generated.
9143 * features/rs6000/powerpc-403gc.c : Re-generated.
9144 * features/rs6000/powerpc-405.c: Re-generated.
9145 * features/rs6000/powerpc-505.c: Re-generated.
9146 * features/rs6000/powerpc-601.c: Re-generated.
9147 * features/rs6000/powerpc-602.c: Re-generated.
9148 * features/rs6000/powerpc-603.c: Re-generated.
9149 * features/rs6000/powerpc-604.c: Re-generated.
9150 * features/rs6000/powerpc-64.c: Re-generated.
9151 * features/rs6000/powerpc-64l.c: Re-generated.
9152 * features/rs6000/powerpc-7400.c: Re-generated.
9153 * features/rs6000/powerpc-750.c: Re-generated.
9154 * features/rs6000/powerpc-860.c: Re-generated.
9155 * features/rs6000/powerpc-altivec32.c: Re-generated.
9156 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9157 * features/rs6000/powerpc-altivec64.c: Re-generated.
9158 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9159 * features/rs6000/powerpc-cell32l.c: Re-generated.
9160 * features/rs6000/powerpc-cell64l.c: Re-generated.
9161 * features/rs6000/powerpc-e500.c: Re-generated.
9162 * features/rs6000/powerpc-e500l.c: Re-generated.
9163 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9164 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9165 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9166 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9167 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9168 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9169 * features/rs6000/powerpc-vsx32.c: Re-generated.
9170 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9171 * features/rs6000/powerpc-vsx64.c: Re-generated.
9172 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9173 * features/rs6000/rs6000.c: Re-generated.
9174 * features/s390-linux32.c: Re-generated.
9175 * features/s390-linux32v1.c: Re-generated.
9176 * features/s390-linux32v2.c: Re-generated.
9177 * features/s390-linux64.c: Re-generated.
9178 * features/s390-linux64v1.c: Re-generated.
9179 * features/s390-linux64v2.c: Re-generated.
9180 * features/s390-te-linux64.c: Re-generated.
9181 * features/s390-tevx-linux64.c: Re-generated.
9182 * features/s390-vx-linux64.c: Re-generated.
9183 * features/s390x-linux64.c: Re-generated.
9184 * features/s390x-linux64v1.c: Re-generated.
9185 * features/s390x-linux64v2.c: Re-generated.
9186 * features/s390x-te-linux64.c: Re-generated.
9187 * features/s390x-tevx-linux64.c: Re-generated.
9188 * features/s390x-vx-linux64.c: Re-generated.
9189 * features/sparc/sparc32-solaris.c: Re-generated.
9190 * features/sparc/sparc64-solaris.c: Re-generated.
9191 * features/tic6x-c62x.c: Re-generated.
9192 * features/tic6x-c62x-linux.c: Re-generated.
9193 * features/tic6x-c64x.c: Re-generated.
9194 * features/tic6x-c64x-linux.c: Re-generated.
9195 * features/tic6x-c64xp.c: Re-generated.
9196 * features/tic6x-c64xp-linux.c: Re-generated.
9198 2017-07-26 Yao Qi <yao.qi@linaro.org>
9200 * i386-linux-tdep.c (i386_linux_read_description): New function.
9201 (i386_linux_core_read_description): Call
9202 i386_linux_read_description.
9203 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9204 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9205 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9206 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9207 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9208 * x86-linux-nat.c (x86_linux_read_description): Call
9209 i386_linux_read_description.
9211 2017-07-26 Yao Qi <yao.qi@linaro.org>
9214 * features/Makefile (%.c: %.xml): Pass the xml file name to
9215 command "maint print c-tdesc".
9216 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9219 2017-07-26 Yao Qi <yao.qi@linaro.org>
9221 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9222 in-class initialization.
9223 (tdesc_create_feature): Call new instead of XCNEW.
9224 (free_target_description): Ue delete.
9226 2017-07-25 John Baldwin <jhb@FreeBSD.org>
9228 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9230 2017-07-25 Yao Qi <yao.qi@linaro.org>
9232 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9234 (amd64_x32_init_abi): Likewise.
9235 * amd64-tdep.h (amd64_init_abi): Update declaration.
9236 (amd64_x32_init_abi): Likewise.
9238 2017-07-25 Yao Qi <yao.qi@linaro.org>
9241 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9242 condition for FPSCR.
9243 (arm_linux_store_inferior_registers): Likewise.
9245 2017-07-22 Tom Tromey <tom@tromey.com>
9247 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9248 <syscalls_counts>: Now a std::vector.
9249 (get_catch_syscall_inferior_data): Use "new".
9250 (catch_syscall_inferior_data_cleanup): Use "delete".
9251 (insert_catch_syscall, remove_catch_syscall)
9252 (clear_syscall_counts): Update.
9254 2017-07-22 Tom Tromey <tom@tromey.com>
9256 * break-catch-syscall.c (syscall_catchpoint)
9257 <syscalls_to_be_caught>: Now a std::vector<int>
9258 (~syscall_catchpoint): Remove.
9259 (insert_catch_syscall, remove_catch_syscall)
9260 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9261 (print_mention_catch_syscall, print_recreate_catch_syscall):
9263 (create_syscall_event_catchpoint): Change type of "filter"
9265 (catch_syscall_split_args): Return a std::vector.
9266 (catch_syscall_command_1, catching_syscall_number_1): Update.
9268 2017-07-22 Tom Tromey <tom@tromey.com>
9270 * break-catch-throw.c (struct exception_catchpoint)
9271 <exception_rx>: Now a std::string.
9272 (~exception_catchpoint): Remove.
9273 (print_one_detail_exception_catchpoint): Update.
9274 (handle_gnu_v3_exceptions): Change type of except_rx.
9275 (extract_exception_regexp): Return a std::string.
9276 (catch_exception_command_1): Update.
9278 2017-07-22 Tom Tromey <tom@tromey.com>
9280 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9281 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9283 <catch_all>: Now a bool.
9284 (~signal_catchpoint): Remove.
9285 (signal_catchpoint_insert_location)
9286 (signal_catchpoint_remove_location)
9287 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9288 (signal_catchpoint_print_mention)
9289 (signal_catchpoint_print_recreate)
9290 (signal_catchpoint_explains_signal): Update.
9291 (create_signal_catchpoint): Change type of "filter" and
9293 (catch_signal_split_args): Return a std::vector. Change type of
9295 (catch_signal_command): Update.
9297 2017-07-20 Pedro Alves <palves@redhat.com>
9299 * ada-lang.c (ada_language_defn): Make extern.
9300 (_initialize_ada_language): Remove add_language call.
9301 * c-lang.c (c_language_defn, cplus_language_defn)
9302 (asm_language_defn, minimal_language_defn): Make extern.
9303 (_initialize_c_language): Delete.
9304 * completer.c (compare_cstrings): Delete, moved to utils.h.
9305 * d-lang.c (d_language_defn): Make extern.
9306 (_initialize_d_language): Remove add_language calls.
9307 * defs.h (enum language): Add comment.
9308 * f-lang.c (f_language_defn): Make extern.
9309 (_initialize_f_language): Remove add_language call.
9310 * go-lang.c (go_language_defn): Make extern.
9311 (_initialize_go_language): Remove add_language call.
9312 * language.c: Include <algorithm>.
9313 (languages): Redefine as const array.
9314 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9315 (set_language_command): Handle "local". Use for-range loop.
9316 (set_language): Remove loop.
9317 (language_enum): Rewrite.
9318 (language_def, language_str): Remove loops.
9319 (add_language): Delete.
9320 (add_set_language_command): New, based on add_languages.
9321 (skip_language_trampoline): Adjust.
9322 (local_language_defn): Delete.
9323 (language_gdbarch_post_init): Adjust.
9324 (_initialize_language): Remove add_language calls. Call
9325 add_set_language_command.
9326 * language.h (add_language): Delete.
9327 (auto_language_defn)
9328 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9329 (asm_language_defn, c_language_defn, cplus_language_defn)
9330 (d_language_defn, f_language_defn, go_language_defn)
9331 (m2_language_defn, objc_language_defn, opencl_language_defn)
9332 (pascal_language_defn, rust_language_defn): Declare.
9333 * m2-lang.c (m2_language_defn): Make extern.
9334 (_initialize_m2_language): Remove add_language call.
9335 * objc-lang.c (objc_language_defn): Make extern.
9336 (_initialize_objc_language): Remove add_language call.
9337 * opencl-lang.c (opencl_language_defn): Make extern.
9338 (_initialize_opencl_language): Remove add_language call.
9339 * p-lang.c (pascal_language_defn): Make extern.
9340 (_initialize_pascal_language): Delete.
9341 * rust-lang.c (rust_language_defn): Make extern.
9342 (_initialize_rust_language): Delete.
9343 * utils.h (compare_cstrings): New static inline function.
9345 2017-07-20 Pedro Alves <palves@redhat.com>
9347 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9348 (get_var_value): Constify parameters.
9349 (get_int_var_value): Change prototype.
9350 (to_fixed_range_type): Adjust.
9351 * ada-lang.h (get_int_var_value): Change prototype.
9353 2017-07-20 Pedro Alves <palves@redhat.com>
9355 * dwarf2read.c (dw2_lookup_symbol): Use
9356 SYMBOL_MATCHES_SEARCH_NAME.
9357 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9359 2017-07-20 Pedro Alves <palves@redhat.com>
9361 * block.c (block_iter_name_step, block_iter_name_first)
9362 (block_iter_name_next): Delete.
9363 (block_lookup_symbol_primary): Adjust to use
9364 dict_iter_match_first/dict_iter_match_next.
9365 * block.h (block_iter_name_first, block_iter_name_next): Delete
9367 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9368 dict_iter_match_first/dict_iter_match_next.
9370 2017-07-20 Pedro Alves <palves@redhat.com>
9372 * cp-support.c (cp_find_first_component_aux): Add missing case for
9375 2017-07-18 David Blaikie <dblaikie@gmail.com>
9377 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9378 of dwo_cu's dwo_file.
9380 2017-07-18 Yao Qi <yao.qi@linaro.org>
9382 * remote.c (store_registers_using_G): Remove one line comment.
9384 2017-07-18 Yao Qi <yao.qi@linaro.org>
9386 * regcache.c (regcache_cpy): Simplify it.
9387 (regcache::cpy_no_passthrough): Remove it.
9388 * regcache.h (cpy_no_passthrough): Remove it.
9389 (regcache_dup, regcache_cpy): Update comments.
9391 2017-07-18 Pedro Alves <palves@redhat.com>
9393 * remote-sim.c (sim_command_completer): Adjust to work with a
9394 completion_tracker instead of a VEC.
9396 2017-07-17 Pedro Alves <palves@redhat.com>
9398 * completer.c (complete_source_filenames): New function.
9399 (complete_address_and_linespec_locations): New function.
9400 (location_completer): Use complete_address_and_linespec_locations.
9401 (completion_tracker::build_completion_result): Honor the tracker's
9402 request to suppress append.
9403 * completer.h (completion_tracker::suppress_append_ws)
9404 (completion_tracker::set_suppress_append_ws): New methods.
9405 (completion_tracker::m_suppress_append_ws): New field.
9406 (complete_source_filenames): New declaration.
9407 * linespec.c (linespec_complete_what): New.
9408 (struct ls_parser) <complete_what, completion_word,
9409 completion_quote_char, completion_quote_end, completion_tracker>:
9411 (string_find_incomplete_keyword_at_end): New.
9412 (linespec_lexer_lex_string): Record quote char. If in completion
9414 (linespec_lexer_consume_token): Advance the completion word point.
9415 (linespec_lexer_peek_token): Save/restore completion info.
9416 (save_stream_and_consume_token): New.
9417 (set_completion_after_number): New.
9418 (linespec_parse_basic): Set what to complete next depending on
9419 token. Handle function and label completions specially.
9420 (parse_linespec): Disable objc shortcut in completion mode. Set
9421 what to complete next depending on token type. Skip keyword if in
9423 (complete_linespec_component, linespec_complete): New.
9424 * linespec.h (linespec_complete): Declare.
9426 2017-07-17 Pedro Alves <palves@redhat.com>
9428 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
9429 Handle 'operator<' / 'operator<<'.
9431 2017-07-17 Pedro Alves <palves@redhat.com>
9433 * completer.c (collect_explicit_location_matches): Handle
9435 (convert_explicit_location_to_linespec): New, factored out from
9437 (convert_explicit_location_to_sals): ... this.
9438 (complete_label): New.
9439 (linespec_complete_label, find_label_symbols_in_block): New.
9440 (find_label_symbols): Add completion_mode parameter and adjust to
9441 call find_label_symbols_in_block.
9442 * linespec.h (linespec_complete_label): Declare.
9444 2017-07-17 Pedro Alves <palves@redhat.com>
9446 * ada-lang.c (ada_collect_symbol_completion_matches): Add
9447 complete_symbol_mode parameter.
9448 * cli/cli-cmds.c (complete_command): Get the completion result out
9449 of the handle_brkchars tracker if used a custom word point.
9450 * completer.c: Include "linespec.h".
9451 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
9452 (advance_to_expression_complete_word_point): New.
9453 (completion_tracker::completes_to_completion_word): New.
9454 (complete_files_symbols): Pass down
9455 complete_symbol_mode::EXPRESSION.
9456 (explicit_options, probe_options): New.
9457 (collect_explicit_location_matches): Complete on the
9458 explictit_loc->foo instead of word. Use
9459 linespec_complete_function. Handle MATCH_LINE. Handle offering
9460 keyword and options completions.
9461 (backup_text_ptr): Delete.
9462 (skip_keyword): New.
9463 (complete_explicit_location): Remove 'word' parameter. Add
9464 language, quoted_arg_start and quoted_arg_end parameters.
9465 Rewrite, parsing left to right.
9466 (location_completer): Rewrite.
9467 (location_completer_handle_brkchars): New function.
9468 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
9469 (enum complete_line_internal_reason): Adjust comments.
9470 (completion_tracker::discard_completions): New.
9471 (completer_handle_brkchars_func_for_completer): Handle
9473 (gdb_custom_word_point_brkchars)
9474 (gdb_org_rl_basic_quote_characters): New.
9475 (gdb_completion_word_break_characters_throw)
9476 (completion_find_completion_word): Handle trackers that use a
9478 (completion_tracker::advance_custom_word_point_by): New.
9479 (completion_tracker::build_completion_result): Don't rely on
9480 readline appending the quote char.
9481 (gdb_rl_attempted_completion_function_throw): Handle trackers that
9482 use a custom word point.
9483 (gdb_rl_attempted_completion_function): Restore
9484 rl_basic_quote_characters.
9485 * completer.h (class completion_tracker): Extend intro comment.
9486 (completion_tracker::set_quote_char)
9487 (completion_tracker::quote_char)
9488 (completion_tracker::set_use_custom_word_point)
9489 (completion_tracker::use_custom_word_point)
9490 (completion_tracker::custom_word_point)
9491 (completion_tracker::set_custom_word_point)
9492 (completion_tracker::advance_custom_word_point_by)
9493 (completion_tracker::completes_to_completion_word)
9494 (completion_tracker::discard_completions): New methods.
9495 (completion_tracker::m_quote_char)
9496 (completion_tracker::m_use_custom_word_point)
9497 (completion_tracker::m_custom_word_point): New fields.
9498 (advance_to_expression_complete_word_point): Declare.
9499 * f-lang.c (f_collect_symbol_completion_matches): Add
9500 complete_symbol_mode parameter.
9501 * language.h (struct language_defn)
9502 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
9504 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
9505 (linespec_complete_function): New function.
9506 (linespec_lexer_lex_keyword): Adjust.
9507 * linespec.h (linespec_keywords, linespec_complete_function): New
9509 * location.c (find_end_quote): New function.
9510 (explicit_location_lex_one): Add explicit_completion_info
9511 parameter. Save quoting info. Don't throw if being called for
9512 completion. Don't handle Ada operators here.
9513 (is_cp_operator, skip_op_false_positives, first_of)
9514 (explicit_location_lex_one_function): New function.
9515 (string_to_explicit_location): Replace 'dont_throw' parameter with
9516 an explicit_completion_info pointer parameter. Handle it. Don't
9517 use explicit_location_lex_one to lex function names. Use
9518 explicit_location_lex_one_function instead.
9519 * location.h (struct explicit_completion_info): New.
9520 (string_to_explicit_location): Replace 'dont_throw' parameter with
9521 an explicit_completion_info pointer parameter.
9522 * symtab.c (default_collect_symbol_completion_matches_break_on):
9523 Add complete_symbol_mode parameter. Handle LINESPEC mode.
9524 (default_collect_symbol_completion_matches)
9525 (collect_symbol_completion_matches): Add complete_symbol_mode
9527 (collect_symbol_completion_matches_type): Pass down
9528 complete_symbol_mode::EXPRESSION.
9529 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9530 parameter. Handle LINESPEC mode.
9531 * symtab.h (complete_symbol_mode): New.
9532 (default_collect_symbol_completion_matches_break_on)
9533 (default_collect_symbol_completion_matches)
9534 (collect_symbol_completion_matches)
9535 (collect_file_symbol_completion_matches): Add complete_symbol_mode
9538 2017-07-17 Pedro Alves <palves@redhat.com>
9540 * utils.c (enum class strncmp_iw_mode): New.
9541 (strcmp_iw): Rename to ...
9542 (strncmp_iw_with_mode): ... this. Add string2_len and mode
9543 parameters. Handle them.
9545 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
9546 * utils.h (strncmp_iw): Declare.
9547 (strcmp_iw): Move describing comments here.
9549 2017-07-17 Pedro Alves <palves@redhat.com>
9551 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
9553 * c-typeprint.c (is_type_conversion_operator): Use
9555 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
9556 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
9558 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
9559 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
9560 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
9561 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
9563 * location.c: Include "cp-support.h".
9564 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
9566 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
9569 2017-07-17 Pedro Alves <palves@redhat.com>
9571 * cli/cli-cmds.c (complete_command): Use a completion tracker
9572 along with completion_find_completion_word for handle_brkchars
9574 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
9575 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
9576 (struct gdb_rl_completion_word_info): New.
9577 (gdb_rl_find_completion_word): New.
9578 (completion_find_completion_word): New.
9579 * completer.h (completion_find_completion_word): Declare.
9581 2017-07-17 Pedro Alves <palves@redhat.com>
9583 * ada-lang.c (symbol_completion_match): Adjust comments.
9584 (symbol_completion_add): Replace vector parameter with
9585 completion_tracker parameter. Use it.
9586 (ada_make_symbol_completion_list): Rename to...
9587 (ada_collect_symbol_completion_matches): ... this. Add
9588 completion_tracker parameter and use it.
9589 (ada_language_defn): Adjust.
9590 * break-catch-syscall.c (catch_syscall_completer): Adjust
9591 prototype and work with completion_tracker instead of VEC.
9592 * breakpoint.c (condition_completer): Adjust prototype and work
9593 with completion_tracker instead of VEC.
9594 * c-lang.c (c_language_defn, cplus_language_defn)
9595 (asm_language_defn, minimal_language_defn): Adjust to renames.
9596 * cli/cli-cmds.c (complete_command): Rework using
9597 completion_tracker. Catch exceptions when completing.
9598 * cli/cli-decode.c (integer_unlimited_completer)
9599 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
9600 with completion_tracker instead of VEC.
9601 * command.h (struct completion_tracker): Forward declare.
9602 (completer_ftype, completer_handle_brkchars_ftype): Change
9604 (complete_on_cmdlist, complete_on_enum): Adjust.
9605 * completer.c: Include <algorithm>.
9606 (struct gdb_completer_state): New.
9607 (current_completion): New global.
9608 (readline_line_completion_function): Delete.
9609 (noop_completer, filename_completer)
9610 (filename_completer_handle_brkchars, complete_files_symbols)
9611 (linespec_location_completer): Adjust to work with a
9612 completion_tracker instead of a VEC.
9613 (string_or_empty): New.
9614 (collect_explicit_location_matches): Adjust to work with a
9615 completion_tracker instead of a VEC.
9616 (explicit_location_completer): Rename to ...
9617 (complete_explicit_location): ... this and adjust to work with a
9618 completion_tracker instead of a VEC.
9619 (location_completer): Adjust to work with a completion_tracker
9621 (add_struct_fields): Adjust to work with a completion_list instead
9623 (expression_completer): Rename to ...
9624 (complete_expression): ... this and adjust to work with a
9625 completion_tracker instead of a VEC. Use complete_files_symbols.
9626 (expression_completer): Reimplement on top of complete_expression.
9627 (symbol_completer): Adjust to work with a completion_tracker
9629 (enum complete_line_internal_reason): Add describing comments.
9630 (complete_line_internal_normal_command): Adjust to work with a
9631 completion_tracker instead of a VEC.
9632 (complete_line_internal): Rename to ...
9633 (complete_line_internal_1): ... this and adjust to work with a
9634 completion_tracker instead of a VEC. Assert TEXT is NULL in the
9635 handle_brkchars phase.
9636 (new_completion_tracker): Delete.
9637 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
9638 complete_line_internal_1.
9639 (free_completion_tracker): Delete.
9640 (INITIAL_COMPLETION_HTAB_SIZE): New.
9641 (completion_tracker::completion_tracker)
9642 (completion_tracker::~completion_tracker): New.
9643 (maybe_add_completion): Delete.
9644 (completion_tracker::maybe_add_completion)
9645 (completion_tracker::add_completion)
9646 (completion_tracker::add_completions): New.
9647 (throw_max_completions_reached_error): Delete.
9648 (complete_line): Adjust to work with a completion_tracker instead
9649 of a VEC. Don't create a completion_tracker_t or check for max
9651 (command_completer, command_completer_handle_brkchars)
9652 (signal_completer, reg_or_group_completer_1)
9653 (reg_or_group_completer, default_completer_handle_brkchars):
9654 Adjust to work with a completion_tracker.
9655 (gdb_completion_word_break_characters_throw): New.
9656 (gdb_completion_word_break_characters): Reimplement.
9657 (line_completion_function): Delete.
9658 (completion_tracker::recompute_lowest_common_denominator)
9659 (expand_preserving_ws)
9660 (completion_tracker::build_completion_result)
9661 (completion_result::completion_result)
9662 (completion_result::completion_result)
9663 (completion_result::~completion_result)
9664 (completion_result::completion_result)
9665 (completion_result::release_match_list, compare_cstrings)
9666 (completion_result::sort_match_list)
9667 (completion_result::reset_match_list)
9668 (gdb_rl_attempted_completion_function_throw)
9669 (gdb_rl_attempted_completion_function): New.
9670 * completer.h (completion_list, struct completion_result)
9671 (class completion_tracker): New.
9672 (complete_line): Add completion_tracker parameter.
9673 (readline_line_completion_function): Delete.
9674 (gdb_rl_attempted_completion_function): New.
9675 (noop_completer, filename_completer, expression_completer)
9676 (location_completer, symbol_completer, command_completer)
9677 (signal_completer, reg_or_group_completer): Update prototypes.
9678 (completion_tracker_t, new_completion_tracker)
9679 (make_cleanup_free_completion_tracker): Delete.
9680 (enum maybe_add_completion_enum): Delete.
9681 (maybe_add_completion): Delete.
9682 (throw_max_completions_reached_error): Delete.
9683 * corefile.c (complete_set_gnutarget): Adjust to work with a
9684 completion_tracker instead of a VEC.
9685 * cp-abi.c (cp_abi_completer): Adjust to work with a
9686 completion_tracker instead of a VEC.
9687 * d-lang.c (d_language_defn): Adjust.
9688 * disasm.c (disassembler_options_completer): Adjust to work with a
9689 completion_tracker instead of a VEC.
9690 * f-lang.c (f_make_symbol_completion_list): Rename to ...
9691 (f_collect_symbol_completion_matches): ... this. Adjust to work
9692 with a completion_tracker instead of a VEC.
9693 (f_language_defn): Adjust.
9694 * go-lang.c (go_language_defn): Adjust.
9695 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
9696 Adjust to work with a completion_tracker instead of a VEC.
9697 * infrun.c (handle_completer): Likewise.
9698 * interps.c (interpreter_completer): Likewise.
9699 * interps.h (interpreter_completer): Likewise.
9700 * language.c (unknown_language_defn, auto_language_defn)
9701 (local_language_defn): Adjust.
9702 * language.h (language_defn::la_make_symbol_completion_list):
9704 (language_defn::la_collect_symbol_completion_matches): ... this
9705 and adjust to work with a completion_tracker instead of a VEC.
9706 * m2-lang.c (m2_language_defn): Adjust.
9707 * objc-lang.c (objc_language_defn): Adjust.
9708 * opencl-lang.c (opencl_language_defn): Adjust.
9709 * p-lang.c (pascal_language_defn): Adjust.
9710 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
9711 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
9712 with a completion_tracker.
9713 * rust-lang.c (rust_language_defn): Adjust.
9714 * symtab.c (free_completion_list, do_free_completion_list)
9715 (return_val, completion_tracker): Delete.
9716 (completion_list_add_name, completion_list_add_symbol)
9717 (completion_list_add_msymbol, completion_list_objc_symbol)
9718 (completion_list_add_fields, add_symtab_completions): Add
9719 completion_tracker parameter and use it.
9720 (default_make_symbol_completion_list_break_on_1): Rename to...
9721 (default_collect_symbol_completion_matches_break_on): ... this.
9722 Add completion_tracker parameter and use it instead of allocating
9723 a completion tracker here.
9724 (default_make_symbol_completion_list_break_on): Delete old
9726 (default_make_symbol_completion_list): Delete.
9727 (default_collect_symbol_completion_matches): New.
9728 (make_symbol_completion_list): Delete.
9729 (collect_symbol_completion_matches): New.
9730 (make_symbol_completion_type): Rename to ...
9731 (collect_symbol_completion_matches_type): ... this. Add
9732 completion_tracker parameter and use it instead of VEC.
9733 (make_file_symbol_completion_list_1): Rename to...
9734 (collect_file_symbol_completion_matches): ... this. Add
9735 completion_tracker parameter and use it instead of VEC.
9736 (make_file_symbol_completion_list): Delete.
9737 (add_filename_to_list): Use completion_list instead of a VEC.
9738 (add_partial_filename_data::list): Now a completion_list.
9739 (make_source_files_completion_list): Work with a completion_list
9741 * symtab.h: Include "completer.h".
9742 (default_make_symbol_completion_list_break_on)
9743 (default_make_symbol_completion_list, make_symbol_completion_list)
9744 (make_symbol_completion_type, make_file_symbol_completion_list)
9745 (make_source_files_completion_list): Delete.
9746 (default_collect_symbol_completion_matches_break_on)
9747 (default_collect_symbol_completion_matches)
9748 (collect_symbol_completion_matches)
9749 (collect_symbol_completion_matches_type)
9750 (collect_file_symbol_completion_matches)
9751 (make_source_files_completion_list): New.
9752 * top.c (init_main): Don't install a rl_completion_entry_function
9753 hook. Install a rl_attempted_completion_function hook instead.
9754 * tui/tui-layout.c (layout_completer): Adjust to work with a
9756 * tui/tui-regs.c (tui_reggroup_completer):
9757 * tui/tui-win.c (window_name_completer, focus_completer)
9758 (winheight_completer): Adjust to work with a completion_tracker.
9759 * value.c: Include "completer.h".
9760 (complete_internalvar): Adjust to work with a completion_tracker.
9761 * value.h (complete_internalvar): Likewise.
9763 2017-07-17 Pedro Alves <palves@redhat.com>
9765 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
9767 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
9768 comments to completer_ftype's declaration.
9769 <completer_handle_brkchars>: Change type to
9770 completer_handle_brkchars_ftype.
9771 * command.h (completer_ftype): Add describing comment and give
9772 names to parameters.
9773 (completer_ftype_void): Rename to ...
9774 (completer_handle_brkchars_ftype) ... this. Add describing comment.
9775 (set_cmd_completer_handle_brkchars): Adjust.
9776 * completer.c (filename_completer_handle_brkchars): New function.
9777 (complete_line_internal_normal_command): New function, factored
9779 (complete_line_internal): ... here.
9780 (command_completer_handle_brkchars)
9781 (default_completer_handle_brkchars)
9782 (completer_handle_brkchars_func_for_completer): New functions.
9783 * completer.h (set_gdb_completion_word_break_characters): Delete
9785 (completer_handle_brkchars_func_for_completer): New declaration.
9786 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
9787 completer_handle_brkchars_func_for_completer.
9789 2017-07-17 Pedro Alves <palves@redhat.com>
9791 * completer.c (symbol_completer): New function, based on
9792 make_symbol_completion_list_fn.
9793 * completer.h (symbol_completer): New declaration.
9794 * guile/scm-cmd.c (cmdscm_completers): Adjust.
9795 * python/py-cmd.c (completers): Adjust.
9796 * symtab.c (make_symbol_completion_list_fn): Delete.
9797 * symtab.h (make_symbol_completion_list_fn): Delete.
9798 * cli/cli-decode.c (add_cmd): Adjust.
9800 2017-07-17 Pedro Alves <palves@redhat.com>
9802 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
9803 * dwarf2read.c: Include "filename-seen-cache.h".
9804 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
9805 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
9806 * filename-seen-cache.c: New file.
9807 * filename-seen-cache.h: New file.
9808 * symtab.c: Include "filename-seen-cache.h".
9809 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
9810 (create_filename_seen_cache, clear_filename_seen_cache)
9811 (delete_filename_seen_cache, filename_seen): Delete, parts moved
9812 to filename-seen-cache.h/filename-seen-cache.c.
9813 (output_source_filename, sources_info)
9814 (maybe_add_partial_symtab_filename)
9815 (make_source_files_completion_list): Adjust to use
9816 filename_seen_cache.
9818 2017-07-17 Pedro Alves <palves@redhat.com>
9820 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
9822 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
9823 dwarf2_debug_sections*)): New.
9824 (dwarf2_per_objfile::dwarf2_per_objfile(const
9825 dwarf2_per_objfile&)): Declare as deleted.
9826 (dwarf2_per_objfile::operator=): Declare as deleted.
9827 (dwarf2_per_objfile::dwarf2_per_objfile)
9828 (dwarf2_per_objfile::~dwarf2_per_objfile)
9829 (dwarf2_per_objfile::free_cached_comp_units): New.
9830 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
9831 ctor. Call dwarf2_per_objfile's ctor manually.
9832 (dwarf2_locate_sections): Deleted/refactored as ...
9833 (dwarf2_per_objfile::locate_sections): ... this new method.
9834 (free_cached_comp_units): Defer to
9835 dwarf2_per_objfile::free_cached_comp_units.
9836 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
9838 2017-07-14 Tom Tromey <tom@tromey.com>
9841 * rust-exp.y (convert_ast_to_expression): Add "want_type"
9843 <UNOP_SIZEOF>: Split into separate case.
9844 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
9846 2017-07-14 Tom Tromey <tom@tromey.com>
9849 * symtab.c (symbol_matches_domain): Add language_rust to special
9851 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
9852 treat LOC_TYPEDEF symbols as variables.
9854 2017-07-14 Pedro Alves <palves@redhat.com>
9856 * symtab.c (make_file_symbol_completion_list_1): Iterate over
9857 symtabs matching all symtabs with SRCFILE as file name instead of
9858 only considering the first hit, with lookup_symtab.
9860 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9862 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
9863 operator_name parameters.
9864 (gen_expr): Update function call.
9866 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9868 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
9870 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
9872 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
9873 parameter, use agent_expr::gdbarch instead, update function
9875 (locexpr_tracepoint_var_ref): Likewise.
9876 (loclist_tracepoint_var_ref): Likewise.
9877 * ax-gdb.c (gen_trace_static_fields): Likewise.
9878 (gen_traced_pop): Likewise.
9879 (gen_frame_args_address): Likewise.
9880 (gen_frame_locals_address): Likewise.
9881 (gen_var_ref): Likewise.
9882 (gen_struct_ref_recursive): Likewise.
9883 (gen_static_field): Likewise.
9884 (gen_maybe_namespace_elt): Likewise.
9885 (gen_expr): Likewise.
9886 (gen_trace_for_var): Likewise.
9887 (gen_trace_for_expr): Likewise.
9888 (gen_trace_for_return_address): Likewise.
9890 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9892 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
9894 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
9896 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
9898 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
9899 from ax, update calls.
9900 (gen_usual_arithmetic): Likewise.
9901 (gen_integral_promotions): Likewise.
9902 (gen_bitfield_ref): Likewise.
9903 (gen_primitive_field): Likewise.
9904 (gen_struct_ref_recursive): Likewise.
9905 (gen_struct_ref): Likewise.
9906 (gen_maybe_namespace_elt): Likewise.
9907 (gen_struct_elt_for_reference): Likewise.
9908 (gen_namespace_elt): Likewise.
9909 (gen_aggregate_elt_ref): Likewise.
9910 (gen_expr): Get gdbarch from ax, update calls.
9911 (gen_expr_binop_rest): Likewise.
9913 2017-07-13 Pedro Alves <palves@redhat.com>
9915 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
9917 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
9918 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
9919 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
9920 tdesc_amd64_linux as default tdesc. Get final tdesc from the
9922 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
9923 Get final tdesc from the tdep.
9924 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
9926 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
9927 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
9928 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
9929 Use it as default tdesc.
9930 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
9931 down to amd_init_abi. No longer handle fallback tdesc here.
9932 * amd64-tdep.h (tdesc_x32): Declare.
9933 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
9935 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
9938 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
9940 * s390-linux-tdep.c (s390_process_record): Add support for
9941 instructions new in arch12.
9943 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9945 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
9946 PT_GETFSBASE and PT_GETGSBASE.
9947 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
9950 2017-07-11 John Baldwin <jhb@FreeBSD.org>
9952 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
9953 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
9954 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
9956 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
9957 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
9958 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
9959 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
9960 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
9961 * features/i386/amd64.xml: Add 64bit-segments.xml.
9962 * features/i386/amd64-avx-avx512.c: Regenerated.
9963 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
9964 * features/i386/amd64-avx-mpx.c: Regenerated.
9965 * features/i386/amd64-avx.c: Regenerated.
9966 * features/i386/amd64-mpx.c: Regenerated.
9967 * features/i386/amd64.c: Regenerated.
9968 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
9969 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9970 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
9971 * regformats/i386/amd64-avx.dat: Regenerated.
9972 * regformats/i386/amd64-mpx.dat: Regenerated.
9973 * regformats/i386/amd64.dat: Regenerated.
9975 2017-07-10 Yao Qi <yao.qi@linaro.org>
9977 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9978 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9980 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
9982 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
9984 * gnulib/aclocal.m4: Regenerate.
9985 * gnulib/config.in: Regenerate.
9986 * gnulib/configure: Regenerate.
9987 * gnulib/import/Makefile.am: Regenerate.
9988 * gnulib/import/Makefile.in: Regenerate.
9989 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
9990 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
9991 * gnulib/import/m4/environ.m4: New file.
9992 * gnulib/import/m4/setenv.m4: New file.
9993 * gnulib/import/setenv.c: New file.
9994 * gnulib/import/unsetenv.c: New file.
9996 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
9998 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
9999 address when op is DW_OP_addr.
10001 2017-07-09 Tom Tromey <tom@tromey.com>
10003 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10004 check and apply to outer type.
10006 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10008 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10009 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10010 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10011 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10013 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10015 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10017 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10019 * corelow.c (get_core_siginfo): Remove.
10020 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10021 instead of get_core_siginfo.
10022 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10023 * gdbarch.h: Re-generate.
10024 * gdbarch.c: Re-generate.
10025 * linux-tdep.c (linux_core_xfer_siginfo): New.
10026 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10028 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10030 * corelow.c (thread_section_name): Move to ...
10031 * gdbcore.h (thread_section_name): ... here.
10033 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10035 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10036 (struct siginfo32): New.
10037 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10038 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10039 via ptrace(PT_LWPINFO).
10041 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10043 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10044 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10045 (fbsd_get_siginfo_type): New.
10046 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10047 (_initialize_fbsd_tdep): New.
10049 2017-07-06 David Blaikie <dblaikie@gmail.com>
10051 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10052 a singular dwo_unit*) to support multiple CUs in the same way that
10053 multiple TUs are supported.
10054 (create_cus_hash_table): Replace create_dwo_cu with a function for
10055 parsing multiple CUs from a DWO file.
10056 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10058 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10059 htab_find, rather than comparing the signature to a singleton CU in
10062 2017-07-06 Pedro Alves <palves@redhat.com>
10064 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10066 2017-07-04 Pedro Alves <palves@redhat.com>
10068 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10069 * gdbtypes.h (TYPE_STATIC): Delete.
10070 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10071 is_synchronized, is_native>: Delete.
10073 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10074 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10075 (TYPE_FN_FIELD_ABSTRACT): Delete.
10077 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10079 * buffer.h (buffer_finish): Fix spelling mistakes.
10081 2017-07-01 Eli Zaretskii <eliz@gnu.org>
10083 * .dir-locals.el: Automatically switch to C-style comments in
10084 versions of Emacs that support the feature.
10086 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10087 Pedro Alves <palves@redhat.com>
10090 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10091 (process_next_line): New variable 'inline_cmd'.
10092 Adjust 'if' clauses for "python", "compile" and "guile" to use
10093 'command_name_equals' and check for '!inline_cmd'.
10095 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10098 * cli/cli-script.c (command_name_equals_not_inline): New function.
10099 (process_next_line): Adjust 'if' clauses for "python", "compile"
10100 and "guile" to use command_name_equals_not_inline.
10102 2017-06-29 Pedro Alves <palves@redhat.com>
10104 * completer.c (expression_completer): Call
10105 linespec_location_completer instead of location_completer.
10107 2017-06-29 Pedro Alves <palves@redhat.com>
10109 * completer.c (expression_completer): Remove code that recomputes
10110 'text' from 'word'.
10112 2017-06-29 Yao Qi <yao.qi@linaro.org>
10114 * regformats/regdat.sh: Generate code with
10115 "ifndef IN_PROCESS_AGENT".
10117 2017-06-28 Pedro Alves <palves@redhat.com>
10119 * command.h: Include "common/scoped_restore.h".
10121 2017-06-28 Yao Qi <yao.qi@linaro.org>
10123 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10124 instead of obstack_grow.
10126 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10129 * symfile.c (reread_symbols): Call objfiles_changed just before
10132 2017-06-27 Pedro Alves <palves@redhat.com>
10134 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10135 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10136 (completion_list_add_symbol, completion_list_add_msymbol):
10137 ... these new functions.
10138 (add_symtab_completions)
10139 (default_make_symbol_completion_list_break_on_1): Adjust.
10141 2017-06-27 Pedro Alves <palves@redhat.com>
10143 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10144 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10145 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10147 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10148 'storage_obstack' field an auto_obstack. In-class initialize all
10149 non-bitfield fields. Make minsyms_read bool.
10150 * symfile.c (read_symbols): Adjust.
10152 2017-06-27 Alan Hayward <alan.hayward@arm.com>
10154 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10155 (gdbsim_store_register): Likewise.
10157 2017-06-27 Pedro Alves <palves@redhat.com>
10159 * c-exp.y (name_obstack): Now an auto_obstack.
10160 (yylex): Use auto_obstack::clear.
10161 (c_parse): Use auto_obstack::clear instead of reinitializing and
10162 freeing the obstack.
10163 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10164 * d-exp.y (name_obstack): Now an auto_obstack.
10165 (yylex): Use auto_obstack::clear.
10166 (d_parse): Use auto_obstack::clear instead of reinitializing and
10167 freeing the obstack.
10168 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10170 * dwarf2read.c (create_addrmap_from_index)
10171 (dwarf2_build_psymtabs_hard)
10172 (update_enumeration_type_from_children): Likewise.
10173 * gdb_obstack.h (auto_obstack): New type.
10174 * go-exp.y (name_obstack): Now an auto_obstack.
10175 (build_packaged_name): Use auto_obstack::clear.
10176 (go_parse): Use auto_obstack::clear instead of reinitializing and
10177 freeing the obstack.
10178 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10180 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10181 * rust-exp.y (work_obstack): Now an auto_obstack.
10182 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10183 reinitializing and freeing the obstack.
10184 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10185 (host_char_to_target): Use auto_obstack.
10186 * utils.h (make_cleanup_obstack_free): Delete declaration.
10187 * valprint.c (generic_emit_char, generic_printstr): Use
10190 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10192 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10194 (darwin_init_thread_list): Don't update dummy thread.
10195 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10197 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10199 * record-full.c (netorder16): Remove.
10201 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10203 * common/diagnostics.h: Define macros for GCC.
10204 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10205 * common/vec.h: Include diagnostics.h.
10206 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10207 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10210 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10212 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10214 * ada-lex.l: Ignore deprecated register warnings.
10216 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10218 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10219 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10221 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10223 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10226 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10228 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10230 2017-06-23 Alan Hayward <alan.hayward@arm.com>
10232 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10233 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10234 (xtensa_register_read_masked): Likewise.
10236 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10238 * common/environ.c (gdb_environ::unset): Update comment.
10240 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10242 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10245 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10247 * record-full.c (record_full_exec_insn): Use byte_vector.
10249 2017-06-22 Yao Qi <yao.qi@linaro.org>
10251 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10252 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10254 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10256 * remote.c (cached_reg): Move from here...
10257 * regcache.h (cached_reg): ...to here.
10258 * python/py-unwind.c (struct reg_info): Remove.
10259 (cached_frame_info): Use cached_reg_t.
10260 (pyuw_prev_register): Likewise.
10261 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10262 (pyuw_dealloc_cache): Free all registers.
10264 2017-06-22 Pedro Alves <palves@redhat.com>
10265 Simon Marchi <simon.marchi@ericsson.com>
10267 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10269 * common/diagnostics.h: New file.
10271 2017-06-22 Pedro Alves <palves@redhat.com>
10273 * common/agent.h: Add include guards.
10275 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10277 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10278 talk about addressable units instead of bytes.
10280 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10282 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10283 of '::const_iterator'.
10285 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10287 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10288 'unittests/environ-selftests.c'.
10289 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10290 * charset.c (find_charset_names): Declare object 'iconv_env'.
10291 Update code to use 'iconv_env' object. Remove call to
10293 * common/environ.c: Include <utility>.
10294 (make_environ): Delete function.
10295 (free_environ): Delete function.
10296 (gdb_environ::clear): New function.
10297 (gdb_environ::operator=): New function.
10298 (gdb_environ::get): Likewise.
10299 (environ_vector): Delete function.
10300 (set_in_environ): Delete function.
10301 (gdb_environ::set): New function.
10302 (unset_in_environ): Delete function.
10303 (gdb_environ::unset): New function.
10304 (gdb_environ::envp): Likewise.
10305 * common/environ.h: Include <vector>.
10306 (struct gdb_environ): Delete; transform into...
10307 (class gdb_environ): ... this class.
10308 (free_environ): Delete prototype.
10309 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10310 environ_vector): Likewise.
10311 * infcmd.c (run_command_1): Update code to call
10312 'envp' from 'gdb_environ' class.
10313 (environment_info): Update code to call methods from 'gdb_environ'
10315 (unset_environment_command): Likewise.
10316 (path_info): Likewise.
10317 (path_command): Likewise.
10318 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10319 (inferior::inferior): Initialize 'environment' using the host's
10321 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10322 Include "environ.h".
10323 (class inferior) <environment>: Change type from 'struct
10324 gdb_environ' to 'gdb_environ'.
10325 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10326 methods from 'gdb_environ' class.
10327 * solib.c (solib_find_1): Likewise
10328 * unittests/environ-selftests.c: New file.
10330 2017-06-20 Yao Qi <yao.qi@linaro.org>
10332 * features/i386/i386-linux.xml: Exchange the order of including
10333 32bit-linux.xml and 32bit-sse.xml.
10334 * features/i386/i386-linux.c: Regenerated.
10336 2017-06-20 Yao Qi <yao.qi@linaro.org>
10338 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10339 Delete copy ctor and assignment operator.
10340 (tdesc_type): Likewise.
10341 (tdesc_feature): Likewise.
10342 (tdesc_free_reg): Remove.
10343 (tdesc_create_reg): Use new.
10344 (tdesc_free_type): Remove.
10345 (tdesc_create_vector): Use new.
10346 (tdesc_create_union): Likewise.
10347 (tdesc_create_flags): Likewise.
10348 (tdesc_create_enum): Likewise.
10349 (tdesc_free_feature): Delete.
10350 (free_target_description): Use delete.
10352 2017-06-19 John Baldwin <jhb@FreeBSD.org>
10354 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10357 2017-06-19 Pedro Alves <palves@redhat.com>
10359 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10360 after gdb::unlinker.
10362 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10364 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10365 gdb_environ to access an environment variable.
10367 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10369 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10372 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10374 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10376 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10378 * configure: Re-generate.
10379 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10381 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10383 * configure: Re-generate.
10384 * warning.m4: Pass -Werror to compiler when checking for
10385 supported warning flags.
10387 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10389 * Makefile.in (COMPILE.pre): Add "-x c++".
10391 2017-06-16 Alan Hayward <alan.hayward@arm.com>
10392 Pedro Alves <palves@redhat.com>
10393 Yao Qi <yao.qi@linaro.org>
10395 * defs.h (RequireLongest): New.
10396 (extract_integer): Declare function template.
10397 (extract_signed_integer): Remove the declaration, but define it
10399 (extract_unsigned_integer): Likewise.
10400 (store_integer): Declare function template.
10401 (store_signed_integer): Remove the declaration, but define it
10403 (store_unsigned_integer): Likewise.
10404 * findvar.c (extract_integer): New function template.
10405 (extract_signed_integer): Remove.
10406 (extract_unsigned_integer): Remove.
10407 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
10409 (store_integer): New function template.
10410 (store_signed_integer): Remove.
10411 (store_unsigned_integer): Remove.
10412 (store_integer): Explicit instantiations.
10413 * regcache.c (regcache_raw_read_signed): Update.
10414 (regcache::raw_read): New function.
10415 (regcache::raw_read_signed): Remove.
10416 (regcache::raw_read_unsigned): Remove.
10417 (regcache_raw_read_unsigned): Update.
10418 (regcache_raw_write_unsigned): Update.
10419 (regcache::raw_write_signed): Remove.
10420 (regcache::raw_write): New function.
10421 (regcache_cooked_read_signed): Update.
10422 (regcache::raw_write_unsigned): Remove.
10423 (regcache::cooked_read_signed): Remove.
10424 (regcache_cooked_read_unsigned): Update.
10425 (regcache::cooked_read_unsigned): Remove.
10426 (regcache_cooked_write_signed): Update.
10427 (regcache_cooked_write_unsigned): Update.
10428 * regcache.h (regcache) <raw_read_signed>: Remove.
10429 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
10430 <raw_read, raw_write>: New.
10431 <cooked_read_signed, cooked_write_signed>: Remove.
10432 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
10433 <cooked_read, cooked_write>: New.
10434 * sh64-tdep.c (sh64_pseudo_register_read): Update.
10435 (sh64_pseudo_register_write): Update.
10437 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
10439 * arc-tdep.c (arc_disassembler_options): New variable.
10440 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
10441 of default_print_insn.
10442 (arc_delayed_print_insn): Set info->section when needed,
10443 use default_print_insn to retrieve a disassembler.
10445 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
10448 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
10449 to mention $SHELL and startup-with-shell.
10451 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
10453 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
10455 2017-06-14 Yao Qi <yao.qi@linaro.org>
10457 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
10458 default_print_insn instead of print_insn_aarch64.
10459 * arm-tdep.c (gdb_print_insn_arm): Call
10460 default_print_insn instead of print_insn_big_arm
10461 and print_insn_little_arm.
10462 * i386-tdep.c (i386_print_insn): Call default_print_insn
10463 instead of print_insn_i386.
10464 * ia64-tdep.c (ia64_print_insn): Call
10465 default_print_insn instead of print_insn_ia64.
10466 * mips-tdep.c (gdb_print_insn_mips): Call
10467 default_print_insn instead of print_insn_big_mips
10468 and print_insn_little_mips.
10469 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
10470 instead of print_insn_spu.
10472 2017-06-14 Pedro Alves <palves@redhat.com>
10474 * ada-lang.c: Include "common/byte-vector.h".
10475 (ada_value_primitive_packed_val): Use gdb::byte_vector.
10476 * charset.c (wchar_iterator::iterate): Resize the vector instead
10478 * common/byte-vector.h: Include "common/def-vector.h".
10479 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
10480 * cli/cli-dump.c: Include "common/byte-vector.h".
10481 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
10482 * common/byte-vector.h: New file.
10483 * common/def-vector.h: New file.
10484 * common/default-init-alloc.h: New file.
10485 * dwarf2loc.c: Include "common/byte-vector.h".
10486 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
10487 instead of reserving it.
10488 * dwarf2read.c: Include "common/byte-vector.h".
10489 (data_buf::m_vec): Now a gdb::byte_vector.
10490 * gdb_regex.c: Include "common/def-vector.h".
10491 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
10492 * mi/mi-main.c: Include "common/byte-vector.h".
10493 (mi_cmd_data_read_memory): Use gdb::byte_vector.
10494 * printcmd.c: Include "common/byte-vector.h".
10495 (print_scalar_formatted): Use gdb::byte_vector.
10496 * valprint.c: Include "common/byte-vector.h".
10497 (maybe_negate_by_bytes, print_decimal_chars): Use
10500 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10502 * darwin-nat.c: Include "nat/fork-inferior.h".
10504 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10506 * configure.nat: Factor out Darwin bits that are not
10507 architecture-specific. Add fork-inferior.o.
10509 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
10511 * configure.nat: Factor out AIX bits that are not
10512 architecture-specific. Add fork-inferior.o.
10514 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10516 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
10517 (read_pieced_value, write_pieced_value): ...here. Reduce to
10518 wrappers that just call rw_pieced_value.
10520 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10522 * dwarf2loc.c (write_pieced_value): When writing the data for a
10523 memory piece, use write_memory_with_notification instead of
10526 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10528 * valops.c (read_value_memory): Change embedded_offset to
10529 represent a bit offset instead of a byte offset.
10530 * value.h (read_value_memory): Adjust comment.
10532 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10534 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
10535 dest_offset_bits and source_offset_bits.
10536 (write_pieced_value): Likewise.
10538 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10540 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
10541 given by DW_OP_bit_piece.
10542 (write_pieced_value): Likewise.
10544 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10546 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
10547 some other preparations to the places where sufficient information
10549 (write_pieced_value): Likewise.
10551 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10553 * dwarf2loc.c (bits_to_bytes): New function.
10554 (read_pieced_value): Fix offset calculations for register pieces
10555 on big-endian targets.
10556 (write_pieced_value): Likewise.
10558 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10560 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
10561 (write_pieced_value): Likewise.
10563 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10565 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
10566 transfer the source value's least significant bits, instead of its
10567 lowest-addressed ones. Rename type_len to max_offset.
10568 (read_pieced_value): Mirror above changes to write_pieced_value as
10571 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10573 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
10574 truncate full bytes from dest_offset_bits before using it as an
10575 offset into the buffer.
10577 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10579 * dwarf2loc.c (write_pieced_value): Include transfer size in
10582 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10584 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
10585 calculation of this_size.
10587 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10589 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
10590 when targeting a bit-field.
10591 (write_pieced_value): Likewise.
10593 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10595 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
10596 (allocate_piece_closure): Drop addr_size parameter.
10597 (dwarf2_evaluate_loc_desc_full): Adjust call to
10598 allocate_piece_closure.
10600 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10603 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
10604 the LSB end, independent of endianness.
10606 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10608 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
10611 2017-06-13 Yao Qi <yao.qi@linaro.org>
10613 * mips-linux-nat.c: Move include features/mips*-linux.c to
10615 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
10616 to mips-linux-tdep.c.
10617 * mips-linux-tdep.c: Include features/mips*-linux.c
10618 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
10620 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
10621 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
10622 (tdesc_mips64_dsp_linux): Declare.
10624 2017-06-12 Tom Tromey <tom@tromey.com>
10626 * valprint.h (val_print_type_code_int): Remove.
10627 * valprint.c (generic_val_print_int): Always call
10628 val_print_scalar_formatted.
10629 (val_print_type_code_int): Remove.
10630 * printcmd.c (print_scalar_formatted): Handle options->format==0.
10631 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
10632 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
10633 * ada-valprint.c (ada_val_print_num): Use
10634 val_print_scalar_formatted.
10636 2017-06-12 Tom Tromey <tom@tromey.com>
10638 * printcmd.c (print_scalar_formatted): Unify the two switches.
10639 Don't convert scalars to LONGEST.
10641 2017-06-12 Tom Tromey <tom@tromey.com>
10644 * valprint.h (print_decimal_chars): Update.
10645 * valprint.c (maybe_negate_by_bytes): New function.
10646 (print_decimal_chars): Add "is_signed" argument.
10647 * printcmd.c (print_scalar_formatted): Update.
10649 2017-06-12 Tom Tromey <tom@tromey.com>
10652 * valprint.h (print_binary_chars, print_hex_chars): Update.
10653 * valprint.c (val_print_type_code_int): Update.
10654 (print_binary_chars): Add "zero_pad" argument.
10655 (emit_octal_digit): New function.
10656 (print_octal_chars): Don't zero-pad.
10657 (print_decimal_chars): Likewise.
10658 (print_hex_chars): Add "zero_pad" argument.
10659 * sh64-tdep.c (sh64_do_fp_register): Update.
10660 * regcache.c (regcache::dump): Update.
10661 * printcmd.c (print_scalar_formatted): Update.
10662 * infcmd.c (default_print_one_register_info): Update.
10664 2017-06-12 Pedro Alves <palves@redhat.com>
10665 Alan Hayward <alan.hayward@arm.com>
10667 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
10668 (mips_eabi_push_dummy_call): Rename local 'regsize' to
10669 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
10670 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
10671 Assert that abi_regsize bytes fit in 'ref_valbuf'.
10673 2017-06-12 Pedro Alves <palves@redhat.com>
10675 * dwarf2read.c (mapped_symtab::data): Now a vector of
10676 symtab_index_entry instead of vector of
10677 std::unique_ptr<symtab_index_entry>. All users adjusted to check
10678 whether an element's name is NULL instead of checking whether the
10679 element itself is NULL.
10680 (find_slot): Change return type. Adjust.
10681 (hash_expand, , add_index_entry, uniquify_cu_indices)
10682 (write_hash_table): Adjust.
10684 2017-06-12 Pedro Alves <palves@redhat.com>
10686 * dwarf2read.c (recursively_count_psymbols): New function.
10687 (write_psymtabs_to_index): Call it to compute number of psyms and
10688 pass estimate size of psyms_seen to unordered_set's ctor.
10690 2017-06-12 Pedro Alves <palves@redhat.com>
10692 * dwarf2read.c (write_hash_table): Check if key already exists
10695 2017-06-12 Pedro Alves <palves@redhat.com>
10697 * dwarf2read.c (data_buf::append_space): Rename to...
10698 (data_buf::grow): ... this, and make private. Adjust all callers.
10699 (data_buf::append_uint): New method.
10700 (add_address_entry, write_one_signatured_type)
10701 (write_psymtabs_to_index): Use it.
10703 2017-06-12 Pedro Alves <palves@redhat.com>
10705 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
10706 (file_write (FILE *, const std::vector<Elem>&)): Delete.
10707 (data_buf::file_write): Call ::fwrite directly.
10709 2017-06-12 Pedro Alves <palves@redhat.com>
10711 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
10712 std::vector::erase.
10714 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
10716 Code cleanup: C++ify .gdb_index producer.
10717 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
10718 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
10719 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
10720 (create_strtab, add_string): Remove.
10721 (file_write, data_buf): New.
10722 (struct symtab_index_entry): Use std::vector for cu_indices.
10723 (struct mapped_symtab): Use std::vector for data.
10724 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
10725 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
10727 (find_slot): Change return type. Update it to the new data structures.
10728 (hash_expand, add_index_entry): Update it to the new data structures.
10729 (offset_type_compare): Remove.
10730 (uniquify_cu_indices): Update it to the new data structures.
10731 (c_str_view, c_str_view_hasher, vector_hasher): New.
10732 (add_indices_to_cpool): Remove.
10733 (write_hash_table): Update it to the new data structures.
10734 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
10735 (eq_psymtab_cu_index): Remove.
10736 (psym_index_map): New typedef.
10737 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
10738 reference and std::unordered_map for cu_index_htab.
10739 (add_address_entry, add_address_entry_worker, write_address_map)
10740 (write_psymbols): Update it to the new data structures.
10741 (write_obstack): Remove.
10742 (struct signatured_type_index_data): Change types_list to a data_buf
10743 reference and psyms_seen to a std::unordered_set reference.
10744 (write_one_signatured_type, recursively_write_psymbols)
10745 (write_psymtabs_to_index): Update it to the new data structures.
10747 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
10749 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
10750 separate-debug-file commands.
10751 * symfile.h (separate_debug_file_debug): New global.
10752 * symfile.c (separate_debug_file_debug): New global.
10753 (separate_debug_file_exists, find_separate_debug_file): Add
10755 (_initialize_symfile): Add "set debug separate-debug-file"
10757 * build-id.c (build_id_to_debug_bfd,
10758 find_separate_debug_file_by_buildid): Add debug output.
10760 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
10762 * gdbarch.sh (displaced_step_free_closure): Remove.
10763 * gdbarch.h, gdbarch.c: Re-generate.
10764 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
10765 displaced_step_free_closure.
10766 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
10767 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
10768 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10769 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10770 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10771 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10772 * arch-utils.h (simple_displaced_step_free_closure): Remove.
10773 * arch-utils.c (simple_displaced_step_free_closure): Remove.
10774 * infrun.c (displaced_step_clear): Call xfree instead of
10775 gdbarch_displaced_step_free_closure.
10777 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
10779 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
10782 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10784 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
10785 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
10786 (mn10300_push_dummy_call): Likewise.
10788 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10790 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
10792 2017-06-08 Alan Hayward <alan.hayward@arm.com>
10794 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
10796 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10798 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
10799 able to start inferiors using a shell.
10800 (New remote packets): Announce new packet "QStartupWithShell".
10801 * remote.c: Add PACKET_QStartupWithShell.
10802 (extended_remote_create_inferior): Handle new
10803 PACKET_QStartupWithShell.
10804 (remote_protocol_features) <QStartupWithShell>: New entry for
10805 PACKET_QStartupWithShell.
10806 (_initialize_remote): Call "add_packet_config_cmd" for
10809 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10810 Pedro Alves <palves@redhat.com>
10812 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
10813 and "nat/fork-inferior.h".
10814 * common/common-inferior.h: New file, with contents from
10816 * commom/common-utils.c: Include "common-utils.h".
10817 (stringify_argv): New function.
10818 * common/common-utils.h (stringify_argv): New prototype.
10819 * configure.nat: Add "fork-inferior.o" as a dependency for
10820 "*linux*", "fbsd*" and "nbsd*" hosts.
10821 * corefile.c (get_exec_file): Update comment.
10822 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
10823 instead of "startup_inferior".
10824 (darwin_create_inferior): Call "add_thread_silent" after
10826 * fork-child.c: Cleanup unnecessary includes.
10827 (SHELL_FILE): Move to "common/common-fork-child.c".
10828 (environ): Likewise.
10829 (exec_wrapper): Initialize.
10830 (get_exec_wrapper): New function.
10831 (breakup_args): Move to "common/common-fork-child.c"; rename to
10832 "breakup_args_for_exec".
10833 (escape_bang_in_quoted_argument): Move to
10834 "common/common-fork-child.c".
10835 (saved_ui): New variable.
10836 (prefork_hook): New function.
10837 (postfork_hook): Likewise.
10838 (postfork_child_hook): Likewise.
10839 (gdb_startup_inferior): Likewise.
10840 (fork_inferior): Move to "common/common-fork-child.c". Update
10841 function to support gdbserver.
10842 (startup_inferior): Likewise.
10843 * gdbcore.h (get_exec_file): Remove declaration.
10844 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
10845 instead of "startup_inferior". Call "add_thread_silent" after
10847 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
10848 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
10849 instead of "startup_inferior". Call "add_thread_silent" after
10851 * inferior.h: Include "common-inferior.h".
10852 (trace_start_error): Move to "common/common-utils.h".
10853 (trace_start_error_with_name): Likewise.
10854 (fork_inferior): Move prototype to "nat/fork-inferior.h".
10855 (startup_inferior): Likewise.
10856 (gdb_startup_inferior): New prototype.
10857 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
10858 * nat/fork-inferior.h: New file.
10859 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
10860 instead of "startup_inferior". Call "add_thread_silent" after
10862 * target.h (target_terminal_init): Move prototype to
10864 (target_terminal_inferior): Likewise.
10865 (target_terminal_ours): Likewise.
10866 * target/target.h (target_terminal_init): New prototype, moved
10868 (target_terminal_inferior): Likewise.
10869 (target_terminal_ours): Likewise.
10870 * utils.c (gdb_flush_out_err): New function.
10872 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10874 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
10875 * common/common-gdbthread.h: New file, with parts from
10877 * gdbthread.h: Include "common-gdbthread.h".
10878 (switch_to_thread): Moved to "common/common-gdbthread.h".
10880 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
10882 * Makefile.in (SFILES): Add "common/job-control.c".
10883 (HFILES_NO_SRCDIR): Add "common/job-control.h".
10884 (COMMON_OBS): Add "job-control.o".
10885 * common/job-control.c: New file, with contents from
10887 * common/job-control.h: New file, with contents from "terminal.h".
10888 * fork-child.c: Include "job-control.h".
10889 * inflow.c: Include "job-control.h".
10890 (gdb_setpgid): Move to "common/common-inflow.c".
10891 (_initialize_inflow): Move setting of "job_control" to
10892 "handle_job_control".
10893 * terminal.h (job_control): Moved to "common/common-terminal.h".
10894 (gdb_setpgid): Likewise.
10895 * top.c: Include "job_control.h".
10896 * utils.c: Likewise.
10897 (job_control): Moved to "job-control.c".
10899 2017-06-07 Pedro Alves <palves@redhat.com>
10901 * Makefile.in (SFILES): Add gdb_regex.c.
10902 (COMMON_OBS): Add gdb_regex.o.
10903 * ada-lang.c (ada_add_standard_exceptions)
10904 (ada_add_exceptions_from_frame, name_matches_regex)
10905 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
10906 parameter type to compiled_regex. Adjust.
10907 (ada_exceptions_list): Use compiled_regex.
10908 * break-catch-throw.c (exception_catchpoint::pattern): Now a
10909 std::unique_ptr<compiled_regex>.
10910 (exception_catchpoint::~exception_catchpoint): Remove regfree
10912 (check_status_exception_catchpoint): Adjust to use compiled_regex.
10913 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
10914 * breakpoint.c (solib_catchpoint::compiled): Now a
10915 std::unique_ptr<compiled_regex>.
10916 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
10917 (check_status_catch_solib): Adjust to use compiled_regex.
10918 (add_solib_catchpoint): Adjust to use compiled_regex.
10919 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
10920 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
10921 compiled_regex reference. Adjust to use it.
10922 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
10923 declaration. Include "gdb_regex.h".
10924 (apropos_cmd): Change regex parameter to compiled_regex reference.
10925 * gdb_regex.c: New file.
10926 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
10928 (class compiled_regex): New.
10929 * linux-tdep.c: Include "common/gdb_optional.h".
10930 (struct mapping_regexes): New, factored out from
10931 mapping_is_anonymous_p, and adjusted to use compiled_regex.
10932 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
10933 gdb::optional and remove cleanups. Adjust to compiled_regex.
10934 * probe.c: Include "common/gdb_optional.h".
10935 (collect_probes): Use compiled_regex and gdb::optional and remove
10937 * skip.c: Include "common/gdb_optional.h".
10938 (skiplist_entry::compiled_function_regexp): Now a
10939 gdb::optional<compiled_regex>.
10940 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
10941 (free_skiplist_entry): Remove regfree call.
10942 (compile_skip_regexp, skip_rfunction_p): Adjust to use
10943 compiled_regex and gdb::optional.
10944 * symtab.c: Include "common/gdb_optional.h".
10945 (search_symbols): Use compiled_regex and gdb::optional.
10946 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
10947 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
10950 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10952 * regcache.c (regcache::save): Avoid buffer use.
10953 (regcache::dump): Likewise.
10955 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10957 * sh-tdep.c (sh_pseudo_register_read): Remove
10959 (sh_pseudo_register_write): Likewise.
10960 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
10961 (sh64_pseudo_register_write): Likewise
10963 2017-06-07 Alan Hayward <alan.hayward@arm.com>
10965 * aarch64-tdep.c (aarch64_store_return_value): Use
10967 (aarch64_pseudo_read_value): Likewise.
10968 (aarch64_pseudo_write): Likewise.
10970 2017-06-06 Yao Qi <yao.qi@linaro.org>
10972 * regformats/regdef.h (set_register_cache): Remove the
10975 2017-06-06 Alan Hayward <alan.hayward@arm.com>
10977 * frame.c (frame_unwind_register_signed): Use
10978 frame_unwind_register_value.
10980 2017-06-06 Pedro Alves <palves@redhat.com>
10982 PR breakpoints/21553
10983 * breakpoint.c (create_breakpoints_sal_default)
10984 (init_breakpoint_sal, create_breakpoint_sal): Use
10985 gdb::unique_xmalloc_ptr for string parameters.
10986 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10987 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
10988 (base_breakpoint_create_breakpoints_sal)
10989 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
10990 (strace_marker_create_breakpoints_sal)
10991 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
10993 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
10994 gdb::unique_xmalloc_ptr for string parameters.
10995 (create_breakpoint): Constify 'extra_string' and 'cond_string'
10998 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11000 * alpha-tdep.c (alpha_register_to_value): Use
11001 get_frame_register_value.
11002 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11004 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11006 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11007 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11008 (ia64_value_to_register): Likewise.
11009 (ia64_extract_return_value): Likewise.
11010 (ia64_store_return_value): Likewise.
11011 (ia64_push_dummy_call): Likewise.
11013 2017-06-04 Joel Brobecker <brobecker@adacore.com>
11017 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11019 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11021 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11023 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11025 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11027 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11029 * event-loop.c (poll_timers): Unallocate timer using delete
11032 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11034 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11035 (struct breakpoint) <~breakpoint>: New.
11036 (struct watchpoint): Inherit from breakpoint.
11037 <~watchpoint>: New.
11039 (struct tracepoint): Inherit from breakpoint.
11041 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11042 (struct longjmp_breakpoint): Inherit from breakpoint.
11043 <~longjmp_breakpoint>: New.
11045 (new_breakpoint_from_type): Remove casts.
11046 (watchpoint_in_thread_scope): Remove reference to base field.
11047 (watchpoint_del_at_next_stop): Likewise.
11048 (update_watchpoint): Likewise.
11049 (watchpoint_check): Likewise.
11050 (bpstat_check_watchpoint): Likewise.
11051 (set_longjmp_breakpoint): Likewise.
11052 (struct fork_catchpoint): Inherit from breakpoint.
11054 (struct solib_catchpoint): Inherit from breakpoint.
11055 <~solib_catchpoint>: New.
11057 (dtor_catch_solib): Change to ...
11058 (solib_catchpoint::~solib_catchpoint): ... this.
11059 (breakpoint_hit_catch_solib): Remove reference to base field.
11060 (add_solib_catchpoint): Likewise.
11061 (create_fork_vfork_event_catchpoint): Likewise.
11062 (struct exec_catchpoint): Inherit from breakpoint.
11063 <~exec_catchpoint>: New.
11065 (dtor_catch_exec): Change to ...
11066 (exec_catchpoint::~exec_catchpoint): ... this.
11067 (dtor_watchpoint): Change to ...
11068 (watchpoint::~watchpoint): ... this.
11069 (watch_command_1): Remove reference to base field.
11070 (catch_exec_command_1): Likewise.
11071 (base_breakpoint_dtor): Change to ...
11072 (breakpoint::~breakpoint): ... this.
11073 (base_breakpoint_ops): Remove dtor field value.
11074 (longjmp_bkpt_dtor): Change to ...
11075 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11076 (strace_marker_create_breakpoints_sal): Remove reference to base
11078 (delete_breakpoint): Don't manually call breakpoint destructor.
11079 (create_tracepoint_from_upload): Remove reference to base field.
11080 (trace_pass_set_count): Likewise.
11081 (initialize_breakpoint_ops): Don't initialize
11082 momentary_breakpoint_ops, don't set dtors.
11083 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11084 <~ada_catchpoint>: New.
11086 (create_excep_cond_exprs): Remove reference to base field.
11087 (dtor_exception): Change to ...
11088 (ada_catchpoint::~ada_catchpoint): ... this.
11089 (dtor_catch_exception): Remove.
11090 (dtor_catch_exception_unhandled): Remove.
11091 (dtor_catch_assert): Remove.
11092 (create_ada_exception_catchpoint): Remove reference to base
11094 (initialize_ada_catchpoint_ops): Don't set dtors.
11095 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11097 <~signal_catchpoint>: New.
11099 (signal_catchpoint_dtor): Change to ...
11100 (signal_catchpoint::~signal_catchpoint): ... this.
11101 (create_signal_catchpoint): Remove reference to base field.
11102 (initialize_signal_catchpoint_ops): Don't set dtor.
11103 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11105 <~syscall_catchpoint>: New.
11107 (dtor_catch_syscall): Change to ...
11108 (syscall_catchpoint::~syscall_catchpoint): ... this.
11109 (create_syscall_event_catchpoint): Remove reference to base
11111 (initialize_syscall_catchpoint_ops): Don't set dtor.
11112 * break-catch-throw.c (struct exception_catchpoint): Inherit
11114 <~exception_catchpoint>: New.
11116 (dtor_exception_catchpoint): Change to ...
11117 (exception_catchpoint::~exception_catchpoint): ... this.
11118 (handle_gnu_v3_exceptions): Remove reference to base field.
11119 (initialize_throw_catchpoint_ops): Don't set dtor.
11120 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11122 * remote.c (remote_get_tracepoint_status): Likewise.
11123 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11124 * tracefile.c (tracefile_fetch_registers): Likewise.
11125 * tracepoint.c (actions_command): Likewise.
11126 (validate_actionline): Likewise.
11127 (tfind_1): Likewise.
11128 (get_traceframe_location): Likewise.
11129 (find_matching_tracepoint_location): Likewise.
11130 (parse_tracepoint_status): Likewise.
11131 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11133 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11135 * breakpoint.c (struct longjmp_breakpoint): New struct.
11136 (is_tracepoint_type): Change return type to bool.
11137 (is_longjmp_type): New function.
11138 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11139 (set_raw_breakpoint_without_location): Use
11140 new_breakpoint_from_type.
11141 (set_raw_breakpoint): Likewise.
11143 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11145 * breakpoint.c (new_breakpoint_from_type): New function.
11146 (create_breakpoint_sal): Use new_breakpoint_from_type and
11148 (create_breakpoint): Likewise.
11150 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11152 * memattr.c (mem_info_command): Rename to ...
11153 (info_mem_command): ... this.
11154 (mem_enable_command): Rename to ...
11155 (enable_mem_command): ... this.
11156 (mem_disable_command): Rename to ...
11157 (disable_mem_command): ... this.
11158 (mem_delete_command): Rename to ...
11159 (delete_mem_command): ... this.
11160 (_initialize_mem): Adjust function names.
11162 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11164 * btrace.c (handle_pt_insn_events): New.
11165 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11166 STATUS. Split into this and ...
11167 (handle_pt_insn_event_flags): ... this.
11169 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11171 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11172 and struct pt_insn.resynced.
11173 * configure: Regenerated.
11174 * config.in: Regenerated.
11176 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11178 * btrace.c (ftrace_find_call_by_number): New function.
11179 (ftrace_new_function): Store objects, not pointers.
11180 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11181 ftrace_new_gap, ftrace_update_function,
11182 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11183 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11184 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11185 btrace_ends_with_single_insn, btrace_call_get): Account for
11186 btrace_thread_info::functions now storing objects.
11187 * btrace.h (struct btrace_thread_info): Add constructor.
11188 (struct btrace_thread_info) <functions>: Make std::vector.
11189 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11190 Initialize with default values.
11191 * record-btrace.c (record_btrace_frame_sniffer): Account for
11192 btrace_thread_info::functions now storing objects.
11194 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11196 * btrace.c: Remove typedef bfun_s.
11197 (ftrace_new_gap): Directly add gaps to the list of gaps.
11198 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11199 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11200 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11201 instead of gdb VEC.
11203 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11205 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11206 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11207 with btrace_thread_info::next_segment and
11208 btrace_thread_info::prev_segment.
11209 * btrace.h: Remove struct btrace_func_link.
11210 (struct btrace_function): Replace pair of function segment pointers
11211 with pair of indices.
11212 * python/py-record-btrace.c (btpy_call_prev_sibling,
11213 btpy_call_next_sibling): Replace references to
11214 btrace_thread_info::segment with btrace_thread_info::next_segment and
11215 btrace_thread_info::prev_segment.
11216 * record-btrace.c (record_btrace_frame_this_id): Use
11217 btrace_find_call_by_number.
11219 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11221 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11222 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11223 btrace_insn_next, btrace_insn_prev): Remove references to
11224 btrace_thread_info::flow.
11225 * btrace.h (struct btrace_function): Remove FLOW.
11227 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11229 * btrace.c (ftrace_find_call_by_number): New function.
11230 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11231 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11232 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11233 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11235 * btrace.h (struct btrace_function): Turn UP into an index.
11236 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11238 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11239 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11240 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11242 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11244 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11245 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11246 ftrace_update_function, ftrace_compute_global_level_offset,
11247 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11248 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11249 btrace_insn_end, btrace_is_empty): Remove references to
11250 btrace_thread_info::begin and btrace_thread_info::end.
11251 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11252 (struct btrace_thread_info) <functions>: Adjust comment.
11253 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11254 btrace_thread_info::begin.
11256 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11258 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11259 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11260 ftrace_update_function): Remove arguments that implicitly were always
11262 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11263 Don't pass BTINFO->END.
11265 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11267 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11268 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11269 btrace_find_insn_by_number): Replace function segment pointer with
11271 (btrace_insn_cmp): Simplify.
11272 * btrace.h: (struct btrace_insn_iterator) Rename index to
11273 insn_index. Replace function segment pointer with index into function
11275 * record-btrace.c (record_btrace_call_history): Replace function
11276 segment pointer use with index.
11277 (record_btrace_frame_sniffer): Retrieve function call segment through
11279 (record_btrace_set_replay): Remove defunc't safety check.
11281 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11283 * btrace.c (btrace_ends_with_single_insn): New function.
11284 (btrace_call_get, btrace_call_number, btrace_call_begin,
11285 btrace_call_end, btrace_call_next, btrace_call_prev,
11286 btrace_find_call_by_number): Use index into call segment vector
11287 instead of pointer.
11288 (btrace_call_cmp): Simplify.
11289 * btrace.h (struct btrace_call_iterator): Replace function call segment
11290 pointer with index into vector.
11291 * record-btrace.c (record_btrace_call_history): Use index instead of
11294 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11296 * btrace.c (btrace_insn_begin, btrace_insn_end,
11297 btrace_find_insn_by_number): Add btinfo to iterator.
11298 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11300 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11302 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11303 and save pointers directly.
11304 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11305 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11306 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11307 changed signature of functions.
11308 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11309 (btrace_fetch): Remove code that adds btrace_function pointers to
11310 vector of btrace_functions.
11311 (btrace_clear): Simplify freeing vector of btrace_functions.
11313 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11315 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11316 Replace VEC_* with std::vector functions.
11317 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11318 (struct btrace_thread_info)<functions>: Change type to std::vector.
11320 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11322 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11323 "Removed targets and native configurations" up. Merge duplicate
11324 "New commands" sub-sections. Add "New options" sub-sections.
11326 2017-05-26 Alan Hayward <alan.hayward@arm.com>
11328 * defs.h (copy_integer_to_size): New declaration.
11329 * findvar.c (copy_integer_to_size): New function.
11330 (do_cint_test): New selftest function.
11331 (copy_integer_to_size_test): Likewise.
11332 (_initialize_findvar): Likewise.
11333 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11334 (mips_fbsd_collect_reg): Use raw_collect_integer.
11335 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11336 (mips64_fill_gregset): Use raw_collect_integer
11337 (mips64_fill_fpregset): Use raw_supply_integer.
11338 * regcache.c (regcache::raw_supply_integer): New function.
11339 (regcache::raw_collect_integer): Likewise.
11340 * regcache.h: (regcache::raw_supply_integer): New declaration.
11341 (regcache::raw_collect_integer): Likewise.
11343 2017-05-24 Yao Qi <yao.qi@linaro.org>
11345 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11346 (COMMON_OBS): Add gdbarch-selftests.o.
11347 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11348 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11349 * gdbarch-selftests.c: New file.
11350 * regcache.h (regcache) <~regcache>: Mark it virtual if
11352 <raw_write>: Likewise.
11354 2017-05-24 Yao Qi <yao.qi@linaro.org>
11356 * regcache.c (current_regcache): Change it to
11357 regcache::current_regcache.
11358 (regcache_observer_target_changed): Update.
11359 (regcache_thread_ptid_changed): Make it a regcache static
11361 (regcache_thread_ptid_changed): Update.
11362 (class regcache_access): New.
11363 (current_regcache_test): Update.
11364 (_initialize_regcache): Update.
11365 * regcache.h: Include forward_list.
11366 (regcache): Declare regcache_thread_ptid_changed and declare
11367 registers_changed_ptid as friend.
11369 2017-05-24 Yao Qi <yao.qi@linaro.org>
11371 * i387-tdep.c (i387_register_to_value): Use register_size
11372 instead of TYPE_LENGTH.
11373 * m68k-tdep.c (m68k_register_to_value): Likewise.
11375 2017-05-24 Yao Qi <yao.qi@linaro.org>
11377 * i387-tdep.c (i387_convert_register_p): Return false if type
11378 code isn't TYPE_CODE_FLT.
11380 2017-05-24 Yao Qi <yao.qi@linaro.org>
11382 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11384 (alpha_register_to_value): Remove type length check.
11385 (alpha_value_to_register): Likewise.
11387 2017-05-24 Yao Qi <yao.qi@linaro.org>
11389 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11392 2017-05-24 Yao Qi <yao.qi@linaro.org>
11394 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11395 TYPE_CODE_FLT or not.
11397 2017-05-24 Yao Qi <yao.qi@linaro.org>
11399 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
11400 * avr-tdep.c (avr_gdbarch_init): Likewise.
11401 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11402 * cris-tdep.c (cris_gdbarch_init): Likewise.
11403 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11404 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11405 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11406 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
11407 * mep-tdep.c (mep_gdbarch_init): Likewise.
11408 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11409 * mips-tdep.c (mips_gdbarch_init): Likewise.
11410 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11411 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11412 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11413 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11414 * v850-tdep.c (v850_gdbarch_init): Likewise.
11416 2017-05-24 Yao Qi <yao.qi@linaro.org>
11418 * selftest-arch.c (tests_with_arch): Call registers_changed
11419 and reinit_frame_cache.
11420 * selftest.c (run_self_tests): Likewise.
11422 2017-05-24 Yao Qi <yao.qi@linaro.org>
11424 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
11425 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
11427 2017-05-24 Yao Qi <yao.qi@linaro.org>
11429 * rl78-tdep.c (rl78_gdbarch_init): Don't call
11430 set_gdbarch_print_insn.
11432 2017-05-24 Yao Qi <yao.qi@linaro.org>
11434 * h8300-tdep.c (h8300_gdbarch_init): Don't call
11435 set_gdbarch_print_insn.
11437 2017-05-24 Yao Qi <yao.qi@linaro.org>
11439 * alpha-tdep.c (alpha_gdbarch_init): Don't call
11440 set_gdbarch_print_insn.
11441 * arc-tdep.c (arc_gdbarch_init): Likewise.
11442 * arch-utils.c: include dis-asm.h.
11443 (default_print_insn): New function.
11444 * arch-utils.h (default_print_insn): Declare.
11445 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
11446 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
11447 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
11448 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
11449 * frv-tdep.c (frv_gdbarch_init): Likewise.
11450 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
11451 * gdbarch.sh (print_insn): Use default_print_insn.
11452 * gdbarch.c: Regenerated.
11453 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
11454 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
11455 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
11456 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
11457 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
11458 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
11459 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
11460 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
11461 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
11462 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
11463 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
11464 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
11465 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
11466 * mt-tdep.c (mt_gdbarch_init): Likewise.
11467 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
11468 * nios2-tdep.c (nios2_print_insn): Remove.
11469 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
11470 * rx-tdep.c (rx_gdbarch_init): Likewise.
11471 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11472 * score-tdep.c (score_print_insn): Remove.
11473 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
11474 * sh-tdep.c (sh_gdbarch_init): Likewise.
11475 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
11476 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
11477 * tic6x-tdep.c (tic6x_print_insn): Remove.
11478 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
11479 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
11480 * v850-tdep.c (v850_gdbarch_init): Likewise.
11481 * vax-tdep.c (vax_gdbarch_init): Likewise.
11482 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
11483 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
11485 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11487 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
11488 (MIPS_FP0_REGNUM): Remove.
11489 (MIPS_FSR_REGNUM): Remove.
11490 (mips_fbsd_supply_fpregs): Use mips_regnum.
11491 (mips_fbsd_supply_gregs): Likewise.
11492 (mips_fbsd_collect_fpregs): Likewise.
11493 (mips_fbsd_collect_gregs): Likewise.
11495 2017-05-23 John Baldwin <jhb@FreeBSD.org>
11497 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
11498 (getpfpregs_supplies): New function.
11499 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
11500 getfpregs_supplies.
11501 (mips_fbsd_store_inferior_registers): Likewise.
11503 2017-05-22 Pedro Alves <palves@redhat.com>
11505 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
11508 2017-05-22 Alan Hayward <alan.hayward@arm.com>
11510 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
11511 (store_register): Likewise.
11512 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
11513 (get_decimal_float_return_value): Likewise.
11514 (do_ppc_sysv_return_value): Likewise.
11515 (ppc64_sysv_abi_push_integer): Likewise.
11516 (ppc64_sysv_abi_push_freg): Likewise.
11517 (ppc64_sysv_abi_return_value_base): Likewise.
11518 (ppc64_sysv_abi_return_value): Likewise.
11519 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
11520 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
11521 * rs6000-nat.c: Likewise.
11522 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
11523 (rs6000_value_to_register): Likewise.
11524 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
11526 2017-05-21 Tom Tromey <tom@tromey.com>
11529 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
11530 arrays as "[T]", not "[T; ]".
11532 2017-05-19 Tom Tromey <tom@tromey.com>
11535 * rust-lang.c (exp_descriptor_rust): New function.
11536 (rust_language_defn): Use it.
11537 * p-lang.c (pascal_language_defn): Update.
11538 * opencl-lang.c (opencl_language_defn): Update.
11539 * objc-lang.c (objc_language_defn): Update.
11540 * m2-lang.c (m2_language_defn): Update.
11541 * language.h (struct language_defn)
11542 <la_watch_location_expression>: New member.
11543 * language.c (unknown_language_defn, auto_language_defn)
11544 (local_language_defn): Update.
11545 * go-lang.c (go_language_defn): Update.
11546 * f-lang.c (f_language_defn): Update.
11547 * d-lang.c (d_language_defn): Update.
11548 * c-lang.h (c_watch_location_expression): Declare.
11549 * c-lang.c (c_watch_location_expression): New function.
11550 (c_language_defn, cplus_language_defn, asm_language_defn)
11551 (minimal_language_defn): Use it.
11552 * breakpoint.c (watch_command_1): Call
11553 la_watch_location_expression.
11554 * ada-lang.c (ada_language_defn): Update.
11556 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11559 * gdb_curses.h (NOMACROS): Define.
11560 (NCURSES_NOMACROS): Define.
11562 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11565 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
11567 * tui/tui-wingeneral.c (box_win): Likewise.
11568 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
11569 (tui_show_source_line): Likewise.
11570 (tui_show_exec_info_content): Likewise.
11572 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
11574 * sparc-tdep.c (sparc_structure_return_p)
11575 (sparc_arg_on_registers_p): New functions.
11576 (sparc32_store_arguments): Use them.
11577 * sparc64-tdep.c (sparc64_16_byte_align_p)
11578 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
11579 Handle TYPE_CODE_ARRAY.
11581 2017-05-17 Yao Qi <yao.qi@linaro.org>
11583 * cli/cli-decode.c (add_alias_cmd): New function.
11584 * command.h (add_alias_cmd): Declare.
11585 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
11586 instead call add_alias_cmd.
11588 2017-05-17 Pedro Alves <palves@redhat.com>
11590 * Makefile.in (nat_extra_makefile_frag): Rename to ...
11591 (nat_makefile_frag): ... this. All references updated.
11592 * configure.ac: Likewise.
11593 * configure.nat: Likewise. Enhance comments.
11594 * configure: Regenerate.
11596 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11598 * procfs.c (procfs_create_inferior): Change prototype to match
11601 2017-05-13 Eli Zaretskii <eliz@gnu.org>
11603 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
11604 C++ compiler warning.
11606 2017-05-12 Tom Tromey <tom@tromey.com>
11609 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
11610 recurse, just call value_struct_elt directly.
11612 2017-05-12 Tom Tromey <tom@tromey.com>
11614 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
11615 OP_RUST_ARRAY>: Fix.
11617 2017-05-12 Tom Tromey <tom@tromey.com>
11619 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
11621 2017-05-09 Yao Qi <yao.qi@linaro.org>
11623 * regcache.c: Include <forward_list>.
11624 (struct regcache_list): Remove.
11625 (current_regcache): Update.
11626 (get_thread_arch_aspace_regcache): Update for std::forward_list.
11627 (regcache_thread_ptid_changed): Likewise.
11628 (registers_changed_ptid): Likewise.
11629 (current_regcache_size): Likewise.
11631 2017-05-09 Yao Qi <yao.qi@linaro.org>
11633 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
11634 (current_regcache_size): New function.
11635 (current_regcache_test): New function.
11636 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
11638 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11640 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
11641 (print_gp_register_row): Use get_frame_register_value.
11643 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11645 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
11646 (mips_supply_fpregset): Likewise.
11647 (mips64_supply_gregset): Likewise.
11649 2017-05-08 Alan Hayward <alan.hayward@arm.com>
11651 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
11652 regcache->raw_supply_zeroed.
11654 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11656 * configure.nat: Rearrange 'case' statements to match
11659 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
11661 * Makefile.in: Remove "@host_makefile_frag@". Add variables
11662 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
11663 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
11664 "@nat_extra_makefile_frag@".
11665 (Makefile): Remove dependency on "@frags@".
11666 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
11667 (data-directory/Makefile): Likewise.
11668 * config/aarch64/linux.mh: Deleted; moved contents to
11669 "gdb/configure.nat".
11670 * config/alpha/alpha-linux.mh: Likewise.
11671 * config/alpha/nbsd.mh: Likewise.
11672 * config/arm/linux.mh: Likewise.
11673 * config/arm/nbsdelf.mh: Likewise.
11674 * config/i386/cygwin.mh: Likewise.
11675 * config/i386/cygwin64.mh: Likewise.
11676 * config/i386/darwin.mh: Likewise.
11677 * config/i386/fbsd.mh: Likewise.
11678 * config/i386/fbsd64.mh: Likewise.
11679 * config/i386/go32.mh: Likewise.
11680 * config/i386/i386gnu.mh: Likewise.
11681 * config/i386/i386sol2.mh: Likewise.
11682 * config/i386/linux.mh: Likewise.
11683 * config/i386/linux64.mh: Likewise.
11684 * config/i386/mingw.mh: Likewise.
11685 * config/i386/mingw64.mh: Likewise.
11686 * config/i386/nbsd64.mh: Likewise.
11687 * config/i386/nbsdelf.mh: Likewise.
11688 * config/i386/nto.mh: Likewise.
11689 * config/i386/obsd.mh: Likewise.
11690 * config/i386/obsd64.mh: Likewise.
11691 * config/i386/sol2-64.mh: Likewise.
11692 * config/ia64/linux.mh: Likewise.
11693 * config/m32r/linux.mh: Likewise.
11694 * config/m68k/linux.mh: Likewise.
11695 * config/m68k/nbsdelf.mh: Likewise.
11696 * config/m68k/obsd.mh: Likewise.
11697 * config/m88k/obsd.mh: Likewise.
11698 * config/mips/fbsd.mh: Likewise.
11699 * config/mips/linux.mh: Likewise.
11700 * config/mips/nbsd.mh: Likewise.
11701 * config/mips/obsd64.mh: Likewise.
11702 * config/pa/linux.mh: Likewise.
11703 * config/pa/nbsd.mh: Likewise.
11704 * config/pa/obsd.mh: Likewise.
11705 * config/powerpc/aix.mh: Likewise.
11706 * config/powerpc/fbsd.mh: Likewise.
11707 * config/powerpc/linux.mh: Likewise.
11708 * config/powerpc/nbsd.mh: Likewise.
11709 * config/powerpc/obsd.mh: Likewise.
11710 * config/powerpc/ppc64-linux.mh: Likewise.
11711 * config/powerpc/spu-linux.mh: Likewise.
11712 * config/s390/linux.mh: Likewise.
11713 * config/sh/nbsd.mh: Likewise.
11714 * config/sparc/fbsd.mh: Likewise.
11715 * config/sparc/linux.mh: Likewise.
11716 * config/sparc/linux64.mh: Likewise.
11717 * config/sparc/nbsd64.mh: Likewise.
11718 * config/sparc/nbsdelf.mh: Likewise.
11719 * config/sparc/obsd64.mh: Likewise.
11720 * config/sparc/sol2.mh: Likewise.
11721 * config/tilegx/linux.mh: Likewise.
11722 * config/vax/nbsdelf.mh: Likewise.
11723 * config/vax/obsd.mh: Likewise.
11724 * config/xtensa/linux.mh: Likewise.
11725 * config/i386/i386gnu.mn: New file, with excerpts from
11726 "config/i386/i386gnu.mh".
11727 * configure: Regenerate.
11728 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
11729 *.mh files under "gdb/config".
11730 * configure.nat: New file, with contents from the
11731 "gdb/config/*/*.mh" files.
11733 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
11735 * btrace.c (btrace_clear): Free insn vector.
11737 2017-05-05 Pedro Alves <palves@redhat.com>
11739 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
11740 * configure: Regenerate.
11742 2017-05-04 Pedro Alves <palves@redhat.com>
11744 * Makefile.in (SFILES): Add progspace-and-thread.c.
11745 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
11746 (COMMON_OBS): Add progspace-and-thread.o.
11747 * breakpoint.c: Include "progspace-and-thread.h".
11748 (update_inserted_breakpoint_locations)
11749 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
11750 Use scoped_restore_current_pspace_and_thread.
11751 (create_std_terminate_master_breakpoint): Use
11752 scoped_restore_current_program_space.
11753 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
11754 (print_breakpoint_location): Use
11755 scoped_restore_current_program_space.
11756 (bp_loc_is_permanent): Use
11757 scoped_restore_current_pspace_and_thread.
11758 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
11759 (download_tracepoint_locations): Use
11760 scoped_restore_current_pspace_and_thread.
11761 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
11762 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
11763 (enum step_over_calls_kind): Moved from inferior.h.
11764 (class scoped_restore_current_thread): New class.
11765 * gdbthread.h (make_cleanup_restore_current_thread): Delete
11767 (scoped_restore_current_thread): New class.
11768 * infcmd.c: Include "common/gdb_optional.h".
11769 (continue_1, proceed_after_attach): Use
11770 scoped_restore_current_thread.
11771 (notice_new_inferior): Use scoped_restore_current_thread.
11772 * inferior.c: Include "progspace-and-thread.h".
11773 (restore_inferior, save_current_inferior): Delete.
11774 (add_inferior_command, clone_inferior_command): Use
11775 scoped_restore_current_pspace_and_thread.
11776 * inferior.h (scoped_restore_current_inferior): New class.
11777 * infrun.c: Include "progspace-and-thread.h" and
11778 "common/gdb_optional.h".
11779 (follow_fork_inferior): Use
11780 scoped_restore_current_pspace_and_thread.
11781 (scoped_restore_exited_inferior): New class.
11782 (handle_vfork_child_exec_or_exit): Use
11783 scoped_restore_exited_inferior,
11784 scoped_restore_current_pspace_and_thread,
11785 scoped_restore_current_thread and scoped_restore.
11786 (fetch_inferior_event): Use scoped_restore_current_thread.
11787 * linespec.c (decode_line_full, decode_line_1): Use
11788 scoped_restore_current_program_space.
11789 * mi/mi-main.c: Include "progspace-and-thread.h".
11790 (exec_continue): Use scoped_restore_current_thread.
11791 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
11792 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
11793 * proc-service.c (ps_pglobal_lookup): Use
11794 scoped_restore_current_program_space.
11795 * progspace-and-thread.c: New file.
11796 * progspace-and-thread.h: New file.
11797 * progspace.c (release_program_space, clone_program_space): Use
11798 scoped_restore_current_program_space.
11799 (restore_program_space, save_current_program_space)
11800 (save_current_space_and_thread): Delete.
11801 (switch_to_program_space_and_thread): Moved to
11802 progspace-and-thread.c.
11803 * progspace.h (save_current_program_space)
11804 (save_current_space_and_thread): Delete declarations.
11805 (scoped_restore_current_program_space): New class.
11806 * remote.c (remote_btrace_maybe_reopen): Use
11807 scoped_restore_current_thread.
11808 * symtab.c: Include "progspace-and-thread.h".
11809 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
11810 * thread.c (print_thread_info_1): Use
11811 scoped_restore_current_thread.
11812 (struct current_thread_cleanup): Delete.
11813 (do_restore_current_thread_cleanup)
11814 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
11815 (scoped_restore_current_thread::~scoped_restore_current_thread):
11817 (make_cleanup_restore_current_thread): Rename/convert to ...
11818 (scoped_restore_current_thread::scoped_restore_current_thread):
11820 (thread_apply_all_command): Use scoped_restore_current_thread.
11821 (thread_apply_command): Use scoped_restore_current_thread.
11822 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
11823 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
11825 2017-05-04 Pedro Alves <palves@redhat.com>
11827 * thread.c (make_cleanup_restore_current_thread): Move
11828 find_thread_ptid call before the is_stopped call. Assert that the
11829 thread is found. Replace is_stopped call by checking the thread's
11830 state directly. Remove unnecessary NULL-thread check.
11832 2017-05-04 Pedro Alves <palves@redhat.com>
11834 * corelow.c (thread_section_name): New class.
11835 (get_core_register_section, get_core_siginfo): Use it.
11837 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
11839 * corelow.c (sniff_core_bfd): Remove extra semicolon.
11840 (get_core_register_section): Remove xfree of NULL pointer.
11842 2017-05-03 Alan Hayward <alan.hayward@arm.com>
11844 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
11845 * regcache.c (regcache::raw_supply_zeroed): New function.
11846 * regcache.h (regcache::raw_supply_zeroed): New declaration.
11848 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
11850 * gdbarch.sh: Remove commented out definition of
11852 * gdbarch.h: Re-generate.
11854 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
11856 * configure: Regenerate.
11858 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
11860 * solib-target.c (solib_target_relocate_section_addresses):
11861 Remove num_section_bases, num_bases, segment_bases variables.
11863 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11865 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
11867 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11869 * solib-target.c: Include <vector>
11870 (struct lm_info_target) <~lm_info_target>: Remove.
11871 <segment_bases, section_bases>: Change type to
11872 std::vector<CORE_ADDR>.
11873 (library_list_start_segment, library_list_start_section,
11874 library_list_end_library,
11875 solib_target_relocate_section_addresses): Adjust.
11877 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11879 * gdbarch.sh (software_single_step): Change return type to
11880 std::vector<CORE_ADDR>.
11881 * gdbarch.c, gdbarch.h: Re-generate.
11882 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
11884 (arm_deal_with_atomic_sequence_raw): Adjust.
11885 (thumb_get_next_pcs_raw): Adjust.
11886 (arm_get_next_pcs_raw): Adjust.
11887 (arm_get_next_pcs): Adjust.
11888 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
11889 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
11890 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
11891 (alpha_software_single_step): Adjust.
11892 * alpha-tdep.h (alpha_software_single_step): Adjust.
11893 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
11894 * arm-tdep.c (arm_software_single_step): Adjust.
11895 (arm_breakpoint_kind_from_current_state): Adjust.
11896 * arm-tdep.h (arm_software_single_step): Adjust.
11897 * breakpoint.c (insert_single_step_breakpoint): Adjust.
11898 * cris-tdep.c (cris_software_single_step): Adjust.
11899 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
11900 (micromips_deal_with_atomic_sequence): Adjust.
11901 (deal_with_atomic_sequence): Adjust.
11902 (mips_software_single_step): Adjust.
11903 * mips-tdep.h (mips_software_single_step): Adjust.
11904 * moxie-tdep.c (moxie_software_single_step): Adjust.
11905 * nios2-tdep.c (nios2_software_single_step): Adjust.
11906 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
11907 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
11908 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
11909 * s390-linux-tdep.c (s390_software_single_step): Adjust.
11910 * sparc-tdep.c (sparc_software_single_step): Adjust.
11911 * spu-tdep.c (spu_software_single_step): Adjust.
11912 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
11914 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
11916 * gdbarch.sh: Use semi-colon as field separator instead of colon.
11917 * gdbarch.h: Re-generate.
11919 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11921 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
11922 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
11923 * python/py-instruction.c, python/py-instruction.h: New file.
11924 * python/py-record.c: Add py-instruction.h include.
11925 (gdbpy_initialize_record): Make gdb.Instruction a super class of
11926 gdb.RecordInstruction.
11927 * python/python-internal.h: Add gdbpy_initialize_instruction
11929 * python/python.c (do_start_initialization): Add
11930 gdbpy_initialize_instruction.
11932 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11934 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
11936 (btrace_func_from_recpy_func): New function.
11937 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
11938 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
11939 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
11940 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
11941 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
11942 Also, use new helper functions.
11943 (btpy_list_item): Use new helper functions.
11944 (recpy_bt_function_call_history): Use new type name.
11945 (btpy_call_getset): Remove.
11946 (gdbpy_initialize_btrace): Remove code to initialize
11947 gdb.BtraceFunctionCall.
11948 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
11949 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
11950 recpy_bt_func_prev, recpy_bt_func_next): New export.
11951 * python/py-record.c (recpy_func_type): New static object.
11952 (recpy_func_new, recpy_func_level, recpy_func_symbol,
11953 recpy_func_instructions, recpy_func_up, recpy_func_prev,
11954 recpy_func_next): New function.
11955 (recpy_element_hash, recpy_element_richcompare): Updated comment.
11956 (recpy_func_getset): New static object.
11957 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
11958 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
11960 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11962 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
11963 (btpy_object, btpy_insn_type, btpy_new): Remove.
11964 (btpy_list_object): Use gdb.RecordInstruction type instead of
11965 gdb.BtraceInstruction type.
11966 (btrace_insn_from_recpy_insn): New function.
11967 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
11969 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
11970 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
11971 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
11972 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
11973 instead of btpy_object.
11974 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
11975 btpy_insn_data, btpy_insn_decode): Rename to ...
11976 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
11977 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
11978 recpy_bt_insn_decode): This. Also, use new helper functions.
11979 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
11981 (btpy_insn_getset): Remove.
11982 (gdbpy_initialize_btrace): Remove code to initialize
11983 gdb.BtraceInstruction. Use recpy_element_object.
11984 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
11985 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
11986 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
11987 * python/py-record.c (recpy_insn_type): New static object.
11988 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
11989 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
11990 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
11992 (recpy_insn_getset): New static object.
11993 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
11994 * python/py-record.h (recpy_element_object): New typedef.
11995 (recpy_insn_type, recpy_insn_new): New export.
11997 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
11999 * py-record-btrace.c (btpy_insn_new): Removed.
12000 (btpy_insn_or_gap_new): New function.
12001 (btpy_insn_error): Removed.
12002 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12003 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12004 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12005 btpy_insn_or_gap_new instead of btpy_insn_new.
12006 (btpy_insn_getset): Remove btpy_insn_error.
12007 * py-record.c (recpy_gap_type): New static object.
12008 (recpy_gap_object): New typedef.
12009 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12010 recpy_gap_reason_string): New function.
12011 (recpy_gap_getset): New static object.
12012 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12013 * py-record.h (recpy_gap_new): New export.
12015 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12017 * python/py-record.c (recpy_ptid): Remove.
12018 (recpy_record_getset): Remove recpy_ptid.
12020 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12022 * btrace.c (btrace_fetch): Set inferior_ptid.
12023 * python/py-record-btrace.c: Add "py-record.h" include.
12024 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12025 recpy_bt_end, recpy_bt_instruction_history,
12026 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12027 in gdb.Record object instead of current ptid.
12028 * python/py-record.c: Include new "py-record.h" file.
12029 (recpy_record_object): Moved to py-record.h.
12030 * python/py-record.h: New file.
12032 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12034 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12035 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12038 2017-05-01 Joel Brobecker <brobecker@adacore.com>
12040 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12041 the past maintainers section.
12043 2017-04-28 Yao Qi <yao.qi@linaro.org>
12045 * infcmd.c (get_return_value): Use regcache ctor, and remove
12048 2017-04-28 Yao Qi <yao.qi@linaro.org>
12049 Pedro Alves <palves@redhat.com>
12051 * regcache.c (regcache::regcache): New tag dispatch ctor.
12052 (do_cooked_read): Moved above.
12053 (regcache_dup): Use the tag dispatch ctor..
12054 * regcache.h (regcache): Declare ctor, delete copy ctor and
12055 assignment operator, remove friend regcache_dup.
12057 2017-04-28 Yao Qi <yao.qi@linaro.org>
12059 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12060 call method save instead of regcache_cpy.
12061 * regcache.h (struct regcache): Make regcache_dup a friend.
12063 2017-04-28 Yao Qi <yao.qi@linaro.org>
12065 * regcache.c (struct regcache): Move to regcache.h
12066 (regcache::arch): New method.
12067 (regcache_get_ptid): Update.
12068 (get_regcache_arch): Call arch method.
12069 (get_regcache_aspace): Call method aspace.
12070 (register_buffer): Change it to method.
12071 (regcache_save): Change it to regcache::save.
12072 (regcache_restore): Likewise.
12073 (regcache_cpy_no_passthrough): Remove the declaration.
12074 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12075 (regcache_cpy_no_passthrough): Change it to method
12076 cpy_no_passthrough.
12077 (regcache_register_status): Change it to method
12078 get_register_status.
12079 (regcache_invalidate): Change it to method invalidate.
12080 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12081 (regcache_raw_update): Change it to method raw_update.
12082 (regcache_raw_read): Likewise.
12083 (regcache_raw_read_signed): Likewise.
12084 (regcache_raw_read_unsigned): Likewise.
12085 (regcache_raw_write_signed): Likewise.
12086 (regcache_raw_write_unsigned): Likewise.
12087 (regcache_cooked_read): Likewise.
12088 (regcache_cooked_read_value): Likewise.
12089 (regcache_cooked_read_signed): Likewise.
12090 (regcache_cooked_read_unsigned): Likewise.
12091 (regcache_cooked_write_signed): Likewise.
12092 (regcache_cooked_write_unsigned): Likewise.
12093 (regcache_raw_set_cached_value): Likewise.
12094 (regcache_raw_write): Likewise.
12095 (regcache_cooked_write): Likewise.
12096 (regcache_xfer_part): Likewise.
12097 (regcache_raw_read_part): Likewise.
12098 (regcache_raw_write_part): Likewise.
12099 (regcache_cooked_read_part): Likewise.
12100 (regcache_cooked_write_part): Likewise.
12101 (regcache_raw_supply): Likewise.
12102 (regcache_raw_collect): Likewise.
12103 (regcache_transfer_regset): Likewise.
12104 (regcache_supply_regset): Likewise.
12105 (regcache_collect_regset): Likewise.
12106 (regcache_debug_print_register): Likewise.
12107 (enum regcache_dump_what): Move it to regcache.h.
12108 (regcache_dump): Change it to method dump.
12109 * regcache.h (enum regcache_dump_what): New.
12110 (class regcache): New.
12111 * target.c (target_fetch_registers): Call method
12112 debug_print_register.
12113 (target_store_registers): Likewise.
12115 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12117 * windows-nat.c (struct lm_info_windows): Initialize field.
12118 (windows_make_so): Allocate lm_info_windows with new.
12119 (windows_free_so): Free lm_info_windows with delete.
12121 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12123 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12124 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12126 (darwin_free_so): Free lm_info_darwin with delete.
12128 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12130 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12131 <l_addr_p>: Change type to bool.
12132 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12133 (svr4_free_so): Free lm_info_svr4 with delete.
12134 (svr4_copy_library_list): Replace memcpy with call to copy
12136 (library_list_start_library, svr4_default_sos): Allocate
12137 lm_info_svr4 with new.
12139 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12141 * solib-target.c (struct lm_info_target): Add destructor,
12143 <name>: Change type to std::string.
12144 (library_list_start_library): Allocate lm_info_target with new.
12145 (solib_target_free_library_list): Free lm_info_target with
12147 (solib_target_current_sos): Adapt to std::string.
12148 (solib_target_free_so): Free lm_info_target with delete.
12150 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12152 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12154 (frv_current_sos): Allocate lm_info_frv with new.
12155 (frv_relocate_main_executable): Free lm_info_frv with delete,
12157 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12159 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12161 * solib-frv.c (struct lm_info_frv): Fix indentation.
12163 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12165 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12167 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12168 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12169 and allocate with new.
12170 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12172 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12174 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12175 <filename, member_name>: Change type to std::string.
12176 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12177 (library_list_start_library): Allocate lm_info_aix with new.
12178 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12179 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12180 with copy constructor.
12182 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12184 * solist.h (struct lm_info): Remove.
12185 (struct lm_info_base): New class.
12186 (struct so_list) <lm_info>: Change type to lm_info_base *.
12187 * nto-tdep.c (struct lm_info): Remove.
12189 * solib-aix.c (struct lm_info): Rename to ...
12190 (struct lm_info_aix): ... this. Extend lm_info_base.
12191 (lm_info_p): Rename to ...
12192 (lm_info_aix_p): ... this, and adjust.
12193 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12194 solib_aix_parse_libraries, library_list_start_library,
12195 solib_aix_free_library_list, solib_aix_parse_libraries,
12196 solib_aix_get_library_list,
12197 solib_aix_relocate_section_addresses, solib_aix_free_so,
12198 solib_aix_get_section_offsets,
12199 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12201 (struct solib_aix_inferior_data) <library_list>: Adjust.
12202 * solib-darwin.c (struct lm_info): Rename to ...
12203 (struct lm_info_darwin): ... this. Extend lm_info_base.
12204 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12205 * solib-dsbt.c (struct lm_info): Rename to ...
12206 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12207 (struct dsbt_info) <main_executable_lm_info): Adjust.
12208 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12209 dsbt_relocate_section_addresses): Adjust.
12210 * solib-frv.c (struct lm_info): Rename to ...
12211 (struct lm_info_frv): ... this. Extend lm_info_base.
12212 (main_executable_lm_info): Adjust.
12213 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12214 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12215 find_canonical_descriptor_in_load_object,
12216 frv_fdpic_find_canonical_descriptor): Adjust.
12217 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12219 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12220 svr4_clear_so, svr4_copy_library_list,
12221 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12222 svr4_current_sos, svr4_fetch_objfile_link_map,
12223 solist_update_incremental): Adjust.
12224 * solib-svr4.h (struct lm_info_svr4): Move here from
12226 * solib-target.c (struct lm_info): Rename to ...
12227 (struct lm_info_target): ... this. Extend lm_info_base.
12228 (lm_info_p): Rename to ...
12229 (lm_info_target_p): ... this.
12230 (solib_target_parse_libraries, library_list_start_segment,
12231 library_list_start_section, library_list_start_library,
12232 library_list_end_library, solib_target_free_library_list,
12233 solib_target_current_sos, solib_target_free_so,
12234 solib_target_relocate_section_addresses): Adjust.
12235 * windows-nat.c (struct lm_info): Rename to ...
12236 (struct lm_info_windows): ... this. Extend lm_info_base.
12237 (windows_make_so, handle_load_dll, handle_unload_dll,
12238 windows_xfer_shared_libraries): Adjust.
12240 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12242 * solib-darwin.c (struct darwin_so_list): Remove.
12243 (darwin_current_sos): Allocate an so_list object instead of a
12244 darwin_so_list, separately allocate an lm_info object.
12245 (darwin_free_so): Free lm_info.
12247 2017-04-28 John Baldwin <jhb@FreeBSD.org>
12249 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12250 with fprintf_filtered.
12252 2017-04-28 Yao Qi <yao.qi@linaro.org>
12254 * regcache.c (regcache::regcache): New function.
12255 (regcache::~regcache): New function.
12256 (regcache_xmalloc_1): Remove.
12257 (regcache_xmalloc): Call new regcache.
12258 (regcache_xfree): Call delete regcache.
12259 (get_thread_arch_aspace_regcache): Call new regcache.
12261 2017-04-28 Yao Qi <yao.qi@linaro.org>
12263 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12264 lwp instead of ptid_get_lwp.
12266 2017-04-28 Yao Qi <yao.qi@linaro.org>
12268 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12269 lwp_info instead of getting from inferior_ptid.
12271 2017-04-27 Keith Seitz <keiths@redhat.com>
12273 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12274 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12275 (CV_CONVERSION_BADNESS): Define.
12276 (rank_one_type): Remove overly restrictive rvalue reference
12278 Add cv-qualifier checks and subranks for type equality.
12279 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12280 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12281 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12283 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12285 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12286 count when creating the object.
12288 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12289 Ulrich Weigand <uweigand@de.ibm.com>
12291 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12292 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12294 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12295 (process_xcoff_symbol): Likewise.
12296 (scan_xcoff_symtab): Likewise.
12298 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12300 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12301 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12302 (ia64_access_reg): Use get_frame_register_unsigned.
12303 (ia64_access_rse_reg): Likewise.
12304 (ia64_libunwind_frame_prev_register): Likewise.
12306 2017-04-26 Jiong Wang <jiong.wang@arm.com>
12308 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12309 * gdbarch.c: Regenerated.
12310 * gdbarch.h: Regenerated.
12311 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12312 visibility external.
12313 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12314 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12315 (enum cfa_how_kind): Move to ...
12316 (struct dwarf2_frame_state_reg_info): Likewise.
12317 (struct dwarf2_frame_state): Likewise.
12318 * dwarf2-frame.h: ... here.
12319 (dwarf2_frame_state_alloc_regs): New declaration.
12320 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12321 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12323 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12325 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12326 regcache_raw_read_unsigned.
12327 (xtensa_pseudo_register_write): Likewise.
12329 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12331 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12332 (nds32_pseudo_register_write): Likewise.
12334 2017-04-25 Yao Qi <yao.qi@linaro.org>
12336 * regcache.c (struct regcache) <readonly_p>: Change its type
12338 (regcache_xmalloc_1): Update parameter type and callers update.
12340 2017-04-25 Yao Qi <yao.qi@linaro.org>
12342 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12343 set_gdbarch_wchar_bit.
12344 * arm-tdep.c (arm_gdbarch_init): Likewise.
12346 2017-04-25 Pedro Alves <palves@redhat.com>
12348 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12349 (BothAreRelocatable, memcopy, memmove): Don't define.
12350 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12353 2017-04-25 Pedro Alves <palves@redhat.com>
12355 * common/common-defs.h: Include "common/poison.h".
12356 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12358 * common/poison.h: New file.
12359 * common/traits.h: Include <type_traits>.
12360 (Not, Or, Requires): New, moved from common/function-view.h.
12362 2017-04-25 Pedro Alves <palves@redhat.com>
12364 * breakpoint.h (struct breakpoint): In-class initialize all
12365 fields. Make boolean fields "bool".
12366 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12367 memset call and initializations no longer necessary.
12369 2017-04-25 Pedro Alves <palves@redhat.com>
12371 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12373 (pt_btrace_insn): New function.
12374 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12376 2017-04-25 Pedro Alves <palves@redhat.com>
12378 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12379 "base" field and inherit from "bp_location" instead. Add
12381 (allocate_location_exception): Use new non-default ctor.
12382 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12383 (init_bp_location): Convert to ...
12384 (bp_location::bp_location): ... this new ctor, and remove memset
12386 (base_breakpoint_allocate_location): Use the new non-default ctor.
12387 * breakpoint.h (bp_location): Now a class. Declare default and
12388 non-default ctors. In-class initialize all members.
12389 (init_bp_location): Remove declaration.
12391 2017-04-25 Pedro Alves <palves@redhat.com>
12393 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12394 assignment operator.
12396 2017-04-24 Yao Qi <yao.qi@linaro.org>
12398 * doublest.c (convert_doublest_to_floatformat): Call
12399 floatformat_totalsize_bytes.
12401 2017-04-22 Tom Tromey <tom@tromey.com>
12403 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
12405 * stack.c (print_frame): Use ui_out_emit_list.
12406 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12408 * mi/mi-main.c (print_one_inferior)
12409 (mi_cmd_data_list_register_names)
12410 (mi_cmd_data_list_register_values, mi_cmd_list_features)
12411 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
12413 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
12414 (mi_output_solib_attribs): Use ui_out_emit_list,
12416 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
12417 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
12418 (mi_cmd_stack_list_args, list_args_or_locals): Use
12420 * disasm.c (do_assembly_only): Use ui_out_emit_list.
12421 * breakpoint.c (print_solib_event, output_thread_groups): Use
12424 2017-04-22 Tom Tromey <tom@tromey.com>
12426 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
12427 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
12428 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
12430 2017-04-22 Tom Tromey <tom@tromey.com>
12432 * tracepoint.c (tvariables_info_1)
12433 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
12435 2017-04-22 Tom Tromey <tom@tromey.com>
12437 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
12438 annotate_arg_emitter.
12439 * breakpoint.c (print_mention_watchpoint)
12440 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
12441 * annotate.h (struct annotate_arg_emitter): New.
12443 2017-04-22 Tom Tromey <tom@tromey.com>
12445 * record-btrace.c (record_btrace_insn_history)
12446 (record_btrace_insn_history_range, record_btrace_call_history)
12447 (record_btrace_call_history_range): Use ui_out_emit_tuple.
12448 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
12450 * stack.c (print_frame_info): Use ui_out_emit_tuple.
12451 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
12452 * skip.c (skip_info): Use ui_out_emit_tuple.
12453 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
12454 * progspace.c (print_program_space): Use ui_out_emit_tuple.
12455 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
12456 * osdata.c (info_osdata): Use ui_out_emit_tuple.
12457 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
12459 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
12460 (output_register, mi_cmd_data_read_memory)
12461 (mi_cmd_data_read_memory_bytes, mi_load_progress)
12462 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
12463 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
12464 Use ui_out_emit_tuple.
12465 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
12467 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12468 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
12469 * linux-thread-db.c (info_auto_load_libthread_db): Use
12471 * inferior.c (print_inferior): Use ui_out_emit_tuple.
12472 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
12473 * disasm.c (do_mixed_source_and_assembly_deprecated)
12474 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
12475 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
12476 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
12477 * breakpoint.c (print_one_breakpoint_location)
12478 (print_one_breakpoint): Use ui_out_emit_tuple.
12479 * auto-load.c (print_script, info_auto_load_cmd): Use
12481 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
12483 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
12485 * thread.c (print_thread_info_1): Remove dead code.
12487 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12489 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
12491 * arm-tdep.c (selftests::arm_record_test): Likewise.
12493 2017-04-21 Yao Qi <yao.qi@linaro.org>
12495 * regcache.c (regcache_restore): Remove argument 2. Replace
12496 argument 3 with regcache. Get register status from
12497 src->register_status and get register contents from
12498 register_buffer (src, regnum).
12499 (regcache_cpy): Update.
12501 2017-04-19 Pedro Alves <palves@redhat.com>
12503 * gdbthread.h (thread): Add missing closing parenthesis in
12506 2017-04-19 Pedro Alves <palves@redhat.com>
12508 * common/refcounted-object.h: New file.
12509 * gdbthread.h: Include "common/refcounted-object.h".
12510 (thread_info): Inherit from refcounted_object and add comments.
12511 (thread_info::incref, thread_info::decref)
12512 (thread_info::m_refcount): Delete.
12513 (thread_info::deletable): Use the refcounted_object::refcount()
12515 * inferior.c (current_inferior_): Add comment.
12516 (set_current_inferior): Increment/decrement refcounts.
12517 (prune_inferiors, remove_inferior_command): Skip inferiors marked
12518 not-deletable instead of comparing with the current inferior.
12519 (initialize_inferiors): Increment the initial inferior's refcount.
12520 * inferior.h (struct inferior): Forward declare.
12521 Include "common/refcounted-object.h".
12522 (current_inferior, set_current_inferior): Move declaration to
12523 before struct inferior's definition, and fix comment.
12524 (inferior): Inherit from refcounted_object. Add comments.
12525 * thread.c (switch_to_thread_no_regs): Reference the thread's
12526 inferior pointer directly instead of doing a ptid lookup.
12527 (switch_to_no_thread): New function.
12528 (switch_to_thread(thread_info *)): New function, factored out
12530 (switch_to_thread(ptid_t)): ... this.
12531 (restore_current_thread): Delete.
12532 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
12533 fields, and add 'inf' field.
12534 (do_restore_current_thread_cleanup): Check whether old->inf is
12535 alive instead of looking up an inferior by ptid. Use
12536 switch_to_thread and switch_to_no_thread.
12537 (restore_current_thread_cleanup_dtor): Use old->inf directly
12538 instead of lookup up an inferior by id. Decref the inferior.
12539 Don't restore 'removable'.
12540 (make_cleanup_restore_current_thread): Same the inferior pointer
12541 in old, instead of the inferior number. Incref the inferior.
12542 Don't save/clear 'removable'.
12544 2017-04-19 Pedro Alves <palves@redhat.com>
12546 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12547 unittests/scoped_restore-selftests.c.
12548 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
12549 * common/scoped_restore.h (scoped_restore_base): Make "class".
12550 (scoped_restore_base::release): New public method.
12551 (scoped_restore_base::scoped_restore_base): New protected ctor.
12552 (scoped_restore_base::m_saved_var): New protected field.
12553 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
12554 scoped_restore_base base class instead of m_saved_var directly.
12555 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
12556 (scoped_restore_tmpl::scoped_restore_tmpl(const
12557 scoped_restore_tmpl<T>&)): Likewise.
12558 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
12560 (scoped_restore_tmpl::saved_var): New method.
12561 (scoped_restore_tmpl::m_saved_var): Delete.
12562 * inferior.h (inferior::detaching): Now a bool.
12563 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
12565 * unittests/scoped_restore-selftests.c: New file.
12567 2017-04-19 Pedro Alves <palves@redhat.com>
12569 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
12570 Re-sort in alphabetic order.
12572 2017-04-18 Pedro Alves <palves@redhat.com>
12574 * xml-support.c (obstack_xml_printf): Delete.
12575 * xml-support.h (obstack_xml_printf): Delete.
12577 2017-04-18 Pedro Alves <palves@redhat.com>
12579 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
12580 vdebug, verror, body_text, start_element, end_element, name,
12581 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
12582 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
12583 is_xinclude>: Make private and add m_ prefix.
12584 (gdb_xml_parser::body_text): New method, based on ...
12585 (gdb_xml_body_text): ... this. Adjust.
12586 (gdb_xml_parser::vdebug): New method, based on ...
12587 (gdb_xml_debug): ... this. Adjust.
12588 (gdb_xml_parser::verror): New method, based on ...
12589 (gdb_xml_error): ... this. Adjust.
12590 (gdb_xml_parser::start_element): New method, based on ...
12591 (gdb_xml_start_element): ... this. Adjust.
12592 (gdb_xml_start_element_wrapper): Defer to
12593 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
12594 (gdb_xml_parser::end_element): New method, based on ...
12595 (gdb_xml_end_element_wrapper): ... this. Adjust.
12596 (gdb_xml_parser::~gdb_xml_parser): Adjust.
12597 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
12598 (gdb_xml_parser::use_dtd): New method, based on ...
12599 (gdb_xml_use_dtd): ... this. Adjust.
12600 (gdb_xml_parser::parse): New method, based on ...
12601 (gdb_xml_parse): ... this. Adjust.
12602 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
12603 (xinclude_start_include): Adjust to call the parser's name method.
12604 (xml_xinclude_default, xml_xinclude_start_doctype)
12605 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
12607 (xml_process_xincludes): Adjust to call parser methods.
12608 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
12611 2017-04-18 Pedro Alves <palves@redhat.com>
12613 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
12614 gdb::optional<std::string>.
12615 * xml-support.c: Include <string>.
12616 (scope_level::scope_level(scope_level &&))
12617 (scope_level::~scope_level): Delete.
12618 (scope_level::body): Now a std::string.
12619 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
12620 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
12622 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
12623 (xinclude_parsing_data::output): Now a std::string reference.
12624 (xinclude_start_include): Adjust.
12625 (xml_xinclude_default): Adjust.
12626 (xml_process_xincludes): Add 'output' parameter, and return bool.
12627 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
12629 * xml-tdesc.c: Include <unordered_map> and <string>.
12630 (tdesc_xml_cache): Delete.
12631 (tdesc_xml_cache_s): Delete.
12632 (xml_cache): Now an std::unordered_map.
12633 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
12634 (target_fetch_description_xml): Change return type to
12635 gdb::optional<std::string>, and adjust.
12636 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
12637 (target_fetch_description_xml): Change return type to
12638 gdb::optional<std::string>.
12640 2017-04-18 Pedro Alves <palves@redhat.com>
12642 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12643 unittests/optional-selftests.c.
12644 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
12645 * unittests/optional-selftests.c: New file.
12646 * unittests/optional/assignment/1.cc: New file.
12647 * unittests/optional/assignment/2.cc: New file.
12648 * unittests/optional/assignment/3.cc: New file.
12649 * unittests/optional/assignment/4.cc: New file.
12650 * unittests/optional/assignment/5.cc: New file.
12651 * unittests/optional/assignment/6.cc: New file.
12652 * unittests/optional/assignment/7.cc: New file.
12653 * unittests/optional/cons/copy.cc: New file.
12654 * unittests/optional/cons/default.cc: New file.
12655 * unittests/optional/cons/move.cc: New file.
12656 * unittests/optional/cons/value.cc: New file.
12657 * unittests/optional/in_place.cc: New file.
12658 * unittests/optional/observers/1.cc: New file.
12659 * unittests/optional/observers/2.cc: New file.
12661 2017-04-18 Pedro Alves <palves@redhat.com>
12663 * common/gdb_optional.h: Include common/traits.h.
12664 (in_place_t): New type.
12665 (in_place): New constexpr variable.
12666 (optional::optional): Remove member initialization of
12668 (optional::optional(in_place_t...)): New constructor.
12669 (optional::~optional): Use reset.
12670 (optional::optional(const optional&)): New.
12671 (optional::optional(const optional&&)): New.
12672 (optional::optional(T &)): New.
12673 (optional::optional(T &&)): New.
12674 (operator::operator=(const optional &)): New.
12675 (operator::operator=(optional &&)): New.
12676 (operator::operator= (const T &))
12677 (operator::operator= (T &&))
12678 (operator::emplace (Args &&... args)): Return a T&. Use reset.
12679 (operator::reset): New.
12680 (operator::m_instantiated):: Add in-class initializer.
12681 * common/traits.h: Include <type_traits>.
12682 (struct And): New types.
12684 2017-04-18 Pedro Alves <palves@redhat.com>
12686 * xml-support.c: Include <vector>.
12687 (scope_level::scope_level(const gdb_xml_element *))
12688 (scope_level::scope_level(scope_level&&)): New.
12689 (scope_level::~scope_level): New.
12690 (scope_level_s): Delete.
12691 (gdb_xml_parser::scopes): Now a std::vector.
12692 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
12694 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12695 scope cleanup code.
12696 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
12697 of the scopes member. Use std::vector::emplace_back.
12699 2017-04-18 Pedro Alves <palves@redhat.com>
12701 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
12703 (gdb_xml_end_element): Change type of first parameter.
12704 (gdb_xml_cleanup): Rename to ...
12705 (gdb_xml_parser::~gdb_xml_parser): ... this.
12706 (gdb_xml_create_parser_and_cleanup): Delete with ...
12707 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
12709 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
12710 using gdb_xml_create_parser_and_cleanup.
12711 (xinclude_parsing_data): Add ctor/dtor.
12712 (xml_xinclude_cleanup): Delete.
12713 (xml_process_xincludes): Create a local xinclude_parsing_data
12714 instead of heap-allocating one. Create a local gdb_xml_parser
12715 instead of heap-allocating one with
12716 gdb_xml_create_parser_and_cleanup.
12718 2017-04-18 John Baldwin <jhb@FreeBSD.org>
12721 * fbsd-nat.c (resume_one_thread_cb): Remove.
12722 (resume_all_threads_cb): Remove.
12723 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
12724 iterate_over_threads.
12726 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12728 * NEWS: Create a new section for the next release branch.
12729 Rename the section of the current branch, now that it has
12732 2017-04-17 Joel Brobecker <brobecker@adacore.com>
12734 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
12735 * version.in: Bump version to 8.0.50.DATE-git.
12737 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
12740 * windows-nat.c (windows_create_inferior): Declare 'allargs'
12741 independently of the host, and fix build breakage on Cygwin.
12743 2017-04-13 Pedro Alves <palves@redhat.com>
12745 * inferior.c (free_inferior): Convert to ...
12746 (inferior::~inferior): ... this dtor.
12747 (inferior::inferior): New ctor, factored out from ...
12748 (add_inferior_silent): ... here. Allocate the inferior with a new
12750 (delete_inferior): Call delete instead of free_inferior.
12751 * inferior.h (gdb_environ, continuation): Forward declare.
12752 (inferior): Now a class. Add in-class initialization to all
12753 members. Make boolean fields bool, except 'detaching'.
12754 (inferior::inferior): New explicit ctor.
12755 (inferior::~inferior): New.
12757 2017-04-13 Pedro Alves <palves@redhat.com>
12759 * inferior.c (init_inferior_list): Delete.
12760 * inferior.h (init_inferior_list): Delete.
12762 2017-04-13 Pedro Alves <palves@redhat.com>
12765 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
12766 (top level): Call it twice, with different thread sets.
12768 2017-04-13 Pedro Alves <palves@redhat.com>
12770 * thread.c: Include <algorithm>.
12771 (thread_array_cleanup): Delete.
12772 (scoped_inc_dec_ref): New class.
12773 (live_threads_count): New function.
12774 (set_thread_refcount): Delete.
12775 (tp_array_compar_ascending): Now a bool.
12776 (tp_array_compar): Convert to a std::sort comparison function.
12777 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
12778 and live_threads_count.
12780 2017-04-13 Pedro Alves <palves@redhat.com>
12782 * infrun.c (follow_fork_inferior): Also switch the current
12785 2017-04-13 Pedro Alves <palves@redhat.com>
12787 * breakpoint.c (watch_command_1): Save watchpoint-frame info
12788 before calling create_internal_breakpoint.
12790 2017-04-13 Pedro Alves <palves@redhat.com>
12792 * fork-child.c (execv_argv): New class.
12793 (breakup_args): Refactored as ...
12794 (execv_argv::init_for_no_shell): .. this method of execv_argv.
12795 Copy arguments to storage and replace separators with NULL
12796 terminators in place.
12797 (escape_bang_in_quoted_argument): Adjust to return bool.
12798 (execv_argv::execv_argv): New ctor.
12799 (execv_argv::init_for_shell): New method, factored out from
12800 fork_inferior. Don't strdup strings into the vector.
12801 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
12802 Remove free_vector_argv call.
12804 2017-04-13 Yao Qi <yao.qi@linaro.org>
12806 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
12809 2017-04-13 Yao Qi <yao.qi@linaro.org>
12811 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
12812 * rx-tdep.c (rx_gdbarch_init): Likewise.
12814 2017-04-13 Pedro Alves <palves@redhat.com>
12816 * breakpoint.h (struct breakpoint): Reindent.
12818 2017-04-13 Pedro Alves <palves@redhat.com>
12820 * breakpoint.c (bp_location): Rename to ...
12821 (bp_locations): ... this. All references updated.
12822 (bp_location_count): Rename to ...
12823 (bp_locations_count): ... this. All references updated.
12824 (bp_location_placed_address_before_address_max): Rename to ...
12825 (bp_locations_placed_address_before_address_max): ... this. All
12826 references updated.
12827 (bp_location_shadow_len_after_address_max): Rename to ...
12828 (bp_locations_shadow_len_after_address_max): ... this. All
12829 references updated.
12830 (bp_location_compare_addrs): Rename to ...
12831 (bp_locations_compare_addrs): ... this. All references updated.
12832 (bp_location_compare):Rename to ...
12833 (bp_locations_compare): ... this. All references updated.
12834 (bp_location_target_extensions_update): Rename to ...
12835 (bp_locations_target_extensions_update): ... this. All references
12838 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
12840 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
12841 * common/common.m4: Check headers 'termios.h', 'termio.h' and
12843 * common/gdb_termios.h: New file, with parts of "terminal.h".
12844 * inflow.c: Include "gdb_termios.h".
12845 * ser-unix.c: Include "gdb_termios.h".
12846 * terminal.h: Move terminal-related defines to
12847 "common/gdb_termios.h".
12849 2017-04-12 Tom Tromey <tom@tromey.com>
12851 * probe.c (parse_probes): Update.
12852 * location.h (delete_event_location): Don't declare.
12853 (event_location_deleter::operator()): Update.
12854 * location.c (event_location_deleter::operator()): Rename from
12855 delete_event_location.
12856 * linespec.h (linespec_result) <location>: Change type to
12858 * linespec.c (canonicalize_linespec, event_location_to_sals)
12859 (decode_objc): Update.
12860 (linespec_result): Don't call delete_event_location.
12861 * breakpoint.c (create_breakpoints_sal)
12862 (bkpt_probe_create_sals_from_location)
12863 (strace_marker_create_sals_from_location): Update.
12865 2017-04-12 Tom Tromey <tom@tromey.com>
12867 * linespec.h (struct linespec_result): Add constructor and
12869 (init_linespec_result, destroy_linespec_result)
12870 (make_cleanup_destroy_linespec_result): Don't declare.
12871 * linespec.c (init_linespec_result): Remove.
12872 (linespec_result::~linespec_result): Rename from
12873 destroy_linespec_result. Update.
12874 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
12876 * breakpoint.c (create_breakpoint, break_range_command)
12877 (decode_location_default): Update.
12878 * ax-gdb.c (agent_command_1): Update.
12880 2017-04-12 Tom Tromey <tom@tromey.com>
12882 * remote.c (remote_download_tracepoint): Update.
12883 * python/py-breakpoint.c (bppy_get_location): Update.
12884 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
12885 (gdbscm_breakpoint_location): Update.
12886 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
12887 * breakpoint.h (struct breakpoint) <location, location_range_end>:
12888 Change type to event_location_up.
12889 * breakpoint.c (create_overlay_event_breakpoint)
12890 (create_longjmp_master_breakpoint)
12891 (create_std_terminate_master_breakpoint)
12892 (create_exception_master_breakpoint)
12893 (breakpoint_event_location_empty_p, print_breakpoint_location)
12894 (print_one_breakpoint_location, create_thread_event_breakpoint)
12895 (init_breakpoint_sal, create_breakpoint)
12896 (print_recreate_ranged_breakpoint, break_range_command)
12897 (init_ada_exception_breakpoint, say_where): Update.
12898 (base_breakpoint_dtor): Don't call delete_event_location.
12899 (bkpt_print_recreate, tracepoint_print_recreate)
12900 (dprintf_print_recreate, update_static_tracepoint)
12901 (breakpoint_re_set_default): Update.
12903 2017-04-12 Tom Tromey <tom@tromey.com>
12905 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
12906 type of "to_do". Update.
12907 (compute_stack_depth): Use std::vector.
12909 2017-04-12 Tom Tromey <tom@tromey.com>
12911 * printcmd.c (find_instruction_backward): Use std::vector.
12913 2017-04-12 Tom Tromey <tom@tromey.com>
12915 * symfile.c (objfilep): Remove typedef.
12916 (reread_symbols): Use a std::vector.
12918 2017-04-12 Tom Tromey <tom@tromey.com>
12920 * mi/mi-main.c (exec_direction_forward): Remove.
12921 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
12922 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
12924 * guile/guile.c (guile_repl_command, guile_command)
12925 (gdbscm_execute_gdb_command): Use scoped_restore.
12926 * go-exp.y (go_parse): Use scoped_restore.
12927 * d-exp.y (d_parse): Use scoped_restore.
12928 * cli/cli-decode.c (cmd_func): Use scoped_restore.
12929 * c-exp.y (c_parse): Use scoped_restore.
12931 2017-04-12 Tom Tromey <tom@tromey.com>
12933 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
12934 (mi_parse): Update return type.
12935 (mi_parse_free): Remove.
12936 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
12937 (mi_parse::~mi_parse): Rename from mi_parse_free.
12938 (mi_parse_cleanup): Remove.
12939 (mi_parse): Return a unique_ptr. Use new.
12940 * mi/mi-main.c (mi_execute_command): Update.
12942 2017-04-12 Tom Tromey <tom@tromey.com>
12944 * location.c (explicit_location_lex_one): Return a
12945 unique_xmalloc_ptr.
12946 (string_to_explicit_location): Update. Remove cleanups.
12948 2017-04-12 Tom Tromey <tom@tromey.com>
12950 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
12951 (compare_value_and_voffset): Change type. Update.
12952 (compute_vtable_size): Change type of "offset_vec".
12953 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
12954 (gnuv3_get_typeid): Remove extraneous declaration.
12956 2017-04-12 Tom Tromey <tom@tromey.com>
12958 * charset.h (wchar_iterator): Fix comment.
12960 2017-04-12 Tom Tromey <tom@tromey.com>
12962 * charset.c (iconv_wrapper): New class.
12963 (cleanup_iconv): Remove.
12964 (convert_between_encodings): Use it.
12966 2017-04-12 Tom Tromey <tom@tromey.com>
12968 * symfile.h (increment_reading_symtab): Update type.
12969 * symfile.c (decrement_reading_symtab): Remove.
12970 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
12971 * psymtab.c (psymtab_to_symtab): Update.
12972 * dwarf2read.c (dw2_instantiate_symtab): Update.
12974 2017-04-12 Tom Tromey <tom@tromey.com>
12976 * jit.c (struct jit_reader): Declare separately. Add constructor
12977 and destructor. Change type of "handle".
12978 (loaded_jit_reader): Define separately.
12979 (jit_reader_load): Update. New "new".
12980 (jit_reader_unload_command): Use "delete".
12981 * gdb-dlfcn.h (struct dlclose_deleter): New.
12982 (gdb_dlhandle_up): New typedef.
12983 (gdb_dlopen, gdb_dlsym): Update types.
12984 (gdb_dlclose): Remove.
12985 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
12986 (gdb_dlsym): Change type of "handle".
12987 (make_cleanup_dlclose): Remove.
12988 (dlclose_deleter::operator()): Rename from gdb_dlclose.
12989 * compile/compile-c-support.c (load_libcc): Update.
12991 2017-04-12 Tom Tromey <tom@tromey.com>
12993 * symtab.h (find_pcs_for_symtab_line): Change return type.
12994 * symtab.c (find_pcs_for_symtab_line): Change return type.
12995 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
12996 type of "vec". Update.
12997 (ltpy_get_pcs_for_line): Update.
12998 * linespec.c (decode_digits_ordinary): Update.
13000 2017-04-12 Tom Tromey <tom@tromey.com>
13002 * tracepoint.c (actions_command): Update.
13003 * python/python.c (python_command, python_interactive_command):
13005 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13006 * guile/guile.c (guile_command): Update.
13007 * defs.h (read_command_lines, read_command_lines_1): Return
13009 (command_lines_deleter): New struct.
13010 (command_line_up): New typedef.
13011 * compile/compile.c (compile_code_command)
13012 (compile_print_command): Update.
13013 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13015 (make_cleanup_free_command_lines): Remove.
13016 * cli/cli-script.c (get_command_line, read_command_lines_1)
13017 (copy_command_lines): Return command_line_up.
13018 (while_command, if_command, read_command_lines, define_command)
13019 (document_command): Update.
13020 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13022 * breakpoint.h (breakpoint_set_commands): Change type of
13024 * breakpoint.c (breakpoint_set_commands): Change type of
13025 "commands". Update.
13026 (do_map_commands_command, update_dprintf_command_list)
13027 (create_tracepoint_from_upload): Update.
13029 2017-04-12 Tom Tromey <tom@tromey.com>
13031 * tracepoint.c (scope_info): Update.
13032 * spu-tdep.c (spu_catch_start): Update.
13033 * python/python.c (gdbpy_decode_line): Update.
13034 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13035 * python/py-breakpoint.c (bppy_init): Update.
13036 * probe.c (parse_probes): Update.
13037 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13038 * location.h (event_location_deleter): New struct.
13039 (event_location_up): New typedef.
13040 (new_linespec_location, new_address_location, new_probe_location)
13041 (new_explicit_location, copy_event_location)
13042 (string_to_event_location, string_to_event_location_basic)
13043 (string_to_explicit_location): Update return type.
13044 (make_cleanup_delete_event_location): Remove.
13045 * location.c (new_linespec_location, new_address_location)
13046 (new_probe_location, new_explicit_location, copy_event_location):
13047 Return event_location_up.
13048 (delete_event_location_cleanup)
13049 (make_cleanup_delete_event_location): Remove.
13050 (string_to_explicit_location, string_to_event_location_basic)
13051 (string_to_event_location): Return event_location_up.
13052 * linespec.c (canonicalize_linespec, event_location_to_sals)
13053 (decode_line_with_current_source)
13054 (decode_line_with_last_displayed, decode_objc): Update.
13055 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13056 * completer.c (location_completer): Update.
13057 * cli/cli-cmds.c (edit_command, list_command): Update.
13058 * breakpoint.c (create_overlay_event_breakpoint)
13059 (create_longjmp_master_breakpoint)
13060 (create_std_terminate_master_breakpoint)
13061 (create_exception_master_breakpoint)
13062 (create_thread_event_breakpoint): Update.
13063 (init_breakpoint_sal): Update. Remove some dead code.
13064 (create_breakpoint_sal): Change type of "location". Update.
13065 (create_breakpoints_sal, create_breakpoint, break_command_1)
13066 (dprintf_command, break_range_command, until_break_command)
13067 (init_ada_exception_breakpoint)
13068 (strace_marker_create_sals_from_location)
13069 (update_static_tracepoint, trace_command, ftrace_command)
13070 (strace_command, create_tracepoint_from_upload): Update.
13071 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13072 * ax-gdb.c (agent_command_1): Update.
13074 2017-04-12 Pedro Alves <palves@redhat.com>
13076 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13077 * configure.tgt: Handle i[34567]86-*-go32* and
13078 i[34567]86-*-msdosdjgpp*.
13079 * i386-tdep.c (i386_svr4_reg_to_regnum):
13081 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13083 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13084 * i386-go32-tdep.c: New file.
13085 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13088 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13090 * aix-thread.c (pd_status2str): Change return type to const char *.
13092 2017-04-12 Pedro Alves <palves@redhat.com>
13094 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13095 calls to set_gdbarch_gnu_triplet_regexp.
13097 2017-04-12 Pedro Alves <palves@redhat.com>
13100 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13102 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13103 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13104 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13105 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13106 * gdbarch.h, gdbarch.c: Regenerate.
13107 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13108 gdbarch_wchar_bit and gdbarch_wchar_signed.
13109 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13110 * arm-tdep.c (arm_gdbarch_init): Likewise.
13111 * avr-tdep.c (avr_gdbarch_init): Likewise.
13112 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13113 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13114 * i386-tdep.c (i386_go32_init_abi): Likewise.
13115 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13116 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13117 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13118 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13119 * sh-tdep.c (sh_gdbarch_init): Likewise.
13120 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13121 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13122 * windows-tdep.c (windows_init_abi): Likewise.
13123 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13125 2017-04-12 Pedro Alves <palves@redhat.com>
13128 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13129 cplus_primitive_type_char32_t>: New enum values.
13130 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13131 and cplus_primitive_type_char32_t.
13132 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13133 32, use the archtecture's built-in type for char16_t and char32_t,
13134 respectively. Otherwise, fallback to init_integer_type as before,
13135 but make the type unsigned, and issue a complaint.
13136 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13138 2017-04-12 Alan Hayward <alan.hayward@arm.com>
13140 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13141 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13143 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13145 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13148 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13150 * common/common-utils.c (free_vector_argv): New function.
13151 * common/common-utils.h: Include <vector>.
13152 (free_vector_argv): New prototype.
13153 * darwin-nat.c (darwin_create_inferior): Rewrite function
13154 prototype in order to constify "exec_file" and accept a
13155 "std::string" for "allargs".
13156 * fork-child.c: Include <vector>.
13157 (breakup_args): Rewrite function, using C++.
13158 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13159 and accept "std::string" for "allargs". Update the code to
13160 calculate "argv" based on "allargs". Update calls to "exec_fun"
13162 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13163 order to constify "exec_file" and accept a "std::string" for
13165 * go32-nat.c (go32_create_inferior): Likewise.
13166 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13167 * infcmd.c (run_command_1): Constify "exec_file". Use
13168 "std::string" for inferior arguments.
13169 * inferior.h (fork_inferior): Update prototype.
13170 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13171 prototype in order to constify "exec_file" and accept a
13172 "std::string" for "allargs".
13173 * nto-procfs.c (procfs_create_inferior): Likewise.
13174 * procfs.c (procfs_create_inferior): Likewise.
13175 * remote-sim.c (gdbsim_create_inferior): Likewise.
13176 * remote.c (extended_remote_run): Update code to accept
13177 "std::string" as argument.
13178 (extended_remote_create_inferior): Rewrite function prototype in
13179 order to constify "exec_file" and accept a "std::string" for
13181 * rs6000-nat.c (super_create_inferior): Likewise.
13182 (rs6000_create_inferior): Likewise.
13183 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13184 * windows-nat.c (windows_create_inferior): Likewise.
13186 2017-04-11 Pedro Alves <palves@redhat.com>
13188 * thread.c: Fix whitespace throughout.
13190 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13192 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13194 2017-04-11 Alan Hayward <alan.hayward@arm.com>
13196 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13198 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13201 * osdata.c (info_osdata): Check if 'type' is an empty string
13204 2017-04-10 Pedro Alves <palves@redhat.com>
13206 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13207 (ptid_to_global_thread_id, in_thread_list)
13208 (do_captured_list_thread_ids, set_resumed, set_running)
13209 (set_executing, set_stop_requested, finish_thread_state)
13210 (validate_registers_access, can_access_registers_ptid)
13211 (print_thread_info_1, switch_to_thread)
13212 (do_restore_current_thread_cleanup)
13213 (make_cleanup_restore_current_thread, thread_command)
13214 (thread_name_command): Use operator== instead of ptid_equal.
13216 2017-04-10 Pedro Alves <palves@redhat.com>
13218 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13219 (current_thread_cleanup_chain): Delete.
13220 (restore_current_thread_cleanup_dtor)
13221 (make_cleanup_restore_current_thread): Remove references to
13222 current_thread_cleanup_chain.
13224 2017-04-10 Alan Hayward <alan.hayward@arm.com>
13226 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13229 2017-04-10 Yao Qi <yao.qi@linaro.org>
13232 * gdbthread.h (thread_info::deletable): New method.
13233 (thread_info::incref): New method.
13234 (thread_info::decref): New method.
13235 (thread_info::refcount): Move it to private.
13236 * infrun.c (save_stop_context): Call inc_refcount.
13237 (release_stop_context_cleanup): Likewise.
13238 * thread.c (set_thread_exited): New function.
13239 (init_thread_list): Delete "tp" only it is deletable, otherwise
13240 call set_thread_exited.
13241 (delete_thread_1): Call set_thread_exited.
13242 (current_thread_cleanup) <inferior_pid>: Remove.
13243 <thread>: New field.
13244 (restore_current_thread_ptid_changed): Removed.
13245 (do_restore_current_thread_cleanup): Adjust.
13246 (restore_current_thread_cleanup_dtor): Don't call
13248 (set_thread_refcount): Use dec_refcount.
13249 (make_cleanup_restore_current_thread): Adjust.
13250 (thread_apply_all_command): Call inc_refcount.
13251 (_initialize_thread): Don't call
13252 observer_attach_thread_ptid_changed.
13254 2017-04-10 Yao Qi <yao.qi@linaro.org>
13256 * thread.c (delete_thread_1): Hoist code on marking thread as
13259 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13261 * windows-nat.c (windows_detach): Initialize ptid with
13264 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13266 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13268 2017-04-07 Alan Hayward <alan.hayward@arm.com>
13270 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13271 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13272 (bfin_pseudo_register_write): Likewise
13274 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13276 * common/ptid.h (struct ptid): Change to...
13277 (class ptid_t): ... this.
13278 <ptid_t>: New constructors.
13279 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13280 matches>: New methods.
13281 <make_null, make_minus_one>: New static methods.
13282 <pid>: Rename to...
13284 <lwp>: Rename to...
13286 <tid>: Rename to...
13288 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13289 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13290 as references, move comment to class ptid_t.
13291 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13292 ptid_t static methods.
13293 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13294 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13295 Take ptid arguments as references, implement using ptid_t methods.
13296 * unittests/ptid-selftests.c: New file.
13297 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13298 unittests/ptid-selftests.c.
13299 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13301 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13303 * python/python.c (python_run_simple_file): Cast mode literal to
13304 non-const char pointer as expected by PyFile_FromString.
13306 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13308 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13309 minus_one_ptid and null_ptid.
13311 2017-04-05 Pedro Alves <palves@redhat.com>
13313 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13314 * configure: Regenerate.
13316 2017-04-05 Pedro Alves <palves@redhat.com>
13318 * ada-exp.y (yyerror): Constify.
13319 * ada-lang.c (bound_name, get_selections)
13320 (ada_variant_discrim_type)
13321 (ada_variant_discrim_name, ada_value_struct_elt)
13322 (ada_lookup_struct_elt_type, is_unchecked_variant)
13323 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13324 (catch_ada_exception_command_split)
13325 (catch_ada_assert_command_split, catch_assert_command)
13326 (ada_op_name): Constify.
13327 * ada-lang.h (ada_yyerror, get_selections)
13328 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13329 * arc-tdep.c (arc_print_frame_cache): Constify.
13330 * arm-tdep.c (arm_skip_stub): Constify.
13331 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13332 (gen_aggregate_elt_ref): Constify.
13333 * bcache.c (print_bcache_statistics): Constify.
13334 * bcache.h (print_bcache_statistics): Constify.
13335 * break-catch-throw.c (catch_exception_command_1):
13336 * breakpoint.c (struct ep_type_description::description):
13338 (add_solib_catchpoint): Constify.
13339 (catch_fork_command_1): Add cast.
13340 (add_catch_command): Constify.
13341 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13343 * bsd-uthread.c (bsd_uthread_state): Constify.
13344 * buildsym.c (patch_subfile_names): Constify.
13345 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13347 * c-exp.y (yyerror): Constify.
13348 (token::oper): Constify.
13349 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13350 * c-varobj.c (cplus_describe_child): Constify.
13351 * charset.c (find_charset_names): Add cast.
13352 (find_charset_names): Constify array and add const_cast.
13353 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13354 (edit_command): Constify.
13355 * cli/cli-decode.c (lookup_cmd): Constify.
13356 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13358 (struct dump_context): Constify.
13359 (add_dump_command, restore_command): Constify.
13360 * cli/cli-script.c (get_command_line): Constify.
13361 * cli/cli-script.h (get_command_line): Constify.
13362 * cli/cli-utils.c (check_for_argument): Constify.
13363 * cli/cli-utils.h (check_for_argument): Constify.
13364 * coff-pe-read.c (struct read_pe_section_data): Constify.
13365 * command.h (lookup_cmd): Constify.
13366 * common/print-utils.c (decimal2str): Constify.
13367 * completer.c (gdb_print_filename): Constify.
13368 * corefile.c (set_gnutarget): Constify.
13369 * cp-name-parser.y (yyerror): Constify.
13370 * cp-valprint.c (cp_print_class_member): Constify.
13371 * cris-tdep.c (cris_register_name, crisv32_register_name):
13373 * d-exp.y (yyerror): Constify.
13374 (struct token::oper): Constify.
13375 * d-lang.h (d_yyerror): Constify.
13376 * dbxread.c (struct header_file_location::name): Constify.
13377 (add_old_header_file, add_new_header_file, last_function_name)
13378 (dbx_next_symbol_text, add_bincl_to_list)
13379 (find_corresponding_bincl_psymtab, set_namestring)
13380 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13381 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13382 * defs.h (command_line_input, print_address_symbolic)
13383 (deprecated_readline_begin_hook): Constify.
13384 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13386 * event-top.c (handle_line_of_input): Constify and add cast.
13387 * exceptions.c (catch_errors): Constify.
13388 * exceptions.h (catch_errors): Constify.
13389 * expprint.c (print_subexp_standard, op_string, op_name)
13390 (op_name_standard, dump_raw_expression, dump_raw_expression):
13391 * expression.h (op_name, op_string, dump_raw_expression):
13393 * f-exp.y (yyerror): Constify.
13394 (struct token::oper): Constify.
13395 (struct f77_boolean_val::name): Constify.
13396 * f-lang.c (f_word_break_characters): Constify.
13397 * f-lang.h (f_yyerror): Constify.
13398 * fork-child.c (fork_inferior): Add cast.
13399 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
13400 (new_variant): Constify.
13401 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
13402 * gdbarch.c: Regenerate.
13403 * gdbcore.h (set_gnutarget): Constify.
13404 * go-exp.y (yyerror): Constify.
13405 (token::oper): Constify.
13406 * go-lang.h (go_yyerror): Constify.
13407 * go32-nat.c (go32_sysinfo): Constify.
13408 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
13409 * guile/scm-cmd.c (cmdscm_function): Constify.
13410 * guile/scm-param.c (pascm_param_value): Constify.
13411 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
13412 (h8300sx_register_name): Constify.
13413 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
13415 * ia64-tdep.c (ia64_register_names): Constify.
13416 * infcmd.c (construct_inferior_arguments): Constify.
13417 (path_command, attach_post_wait): Constify.
13418 * language.c (show_range_command, show_case_command)
13419 (unk_lang_error): Constify.
13420 * language.h (language_defn::la_error)
13421 (language_defn::la_name_of_this): Constify.
13422 * linespec.c (decode_line_2): Constify.
13423 * linux-thread-db.c (thread_db_err_str): Constify.
13424 * lm32-tdep.c (lm32_register_name): Constify.
13425 * m2-exp.y (yyerror): Constify.
13426 * m2-lang.h (m2_yyerror): Constify.
13427 * m32r-tdep.c (m32r_register_names): Constify and make static.
13428 * m68hc11-tdep.c (m68hc11_register_names): Constify.
13429 * m88k-tdep.c (m88k_register_name): Constify.
13430 * macroexp.c (appendmem): Constify.
13431 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
13432 (upgrade_type, parse_external, parse_partial_symbols)
13433 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
13434 (new_symbol): Constify.
13435 * memattr.c (mem_info_command): Constify.
13436 * mep-tdep.c (register_name_from_keyword): Constify.
13437 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
13439 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
13440 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
13441 * mi/mi-main.c (captured_mi_execute_command): Constify and add
13443 (mi_execute_async_cli_command): Constify.
13444 * mips-tdep.c (mips_register_name): Constify.
13445 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
13446 (am33_register_name, am33_2_register_name)
13447 * moxie-tdep.c (moxie_register_names): Constify.
13448 * nat/linux-osdata.c (osdata_type): Constify fields.
13449 * nto-tdep.c (nto_parse_redirection): Constify.
13450 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
13451 (lookup_child_selector): Constify.
13452 (objc_methcall::name): Constify.
13453 * objc-lang.h (lookup_objc_class, lookup_child_selector)
13454 (lookup_struct_typedef): Constify.
13455 * objfiles.c (pc_in_section): Constify.
13456 * objfiles.h (pc_in_section): Constify.
13457 * p-exp.y (struct token::oper): Constify.
13458 (yyerror): Constify.
13459 * p-lang.h (pascal_yyerror): Constify.
13460 * parser-defs.h (op_name_standard): Constify.
13461 (op_print::string): Constify.
13462 (exp_descriptor::op_name): Constify.
13463 * printcmd.c (print_address_symbolic): Constify.
13464 * psymtab.c (print_partial_symbols): Constify.
13465 * python/py-breakpoint.c (stop_func): Constify.
13466 (bppy_get_expression): Constify.
13467 * python/py-cmd.c (cmdpy_completer::name): Constify.
13468 (cmdpy_function): Constify.
13469 * python/py-event.c (evpy_add_attribute)
13470 (gdbpy_initialize_event_generic): Constify.
13471 * python/py-event.h (evpy_add_attribute)
13472 (gdbpy_initialize_event_generic): Constify.
13473 * python/py-evts.c (add_new_registry): Constify.
13474 * python/py-finishbreakpoint.c (outofscope_func): Constify.
13475 * python/py-framefilter.c (get_py_iter_from_func): Constify.
13476 * python/py-inferior.c (get_buffer): Add cast.
13477 * python/py-param.c (parm_constant::name): Constify.
13478 * python/py-unwind.c (fprint_frame_id): Constify.
13479 * python/python.c (gdbpy_parameter_value): Constify.
13480 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
13481 * remote.c (memory_packet_config::name): Constify.
13482 (show_packet_config_cmd, remote_write_bytes)
13483 (remote_buffer_add_string):
13484 * reverse.c (exec_reverse_once): Constify.
13485 * rs6000-tdep.c (variant::name, variant::description): Constify.
13486 * rust-exp.y (rustyyerror): Constify.
13487 * rust-lang.c (rust_op_name): Constify.
13488 * rust-lang.h (rustyyerror): Constify.
13489 * serial.h (serial_ops::name): Constify.
13490 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
13491 (sh_sh3e_register_name, sh_sh2e_register_name)
13492 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
13493 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
13494 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
13495 (sh_sh4al_dsp_register_name): Constify.
13496 * sh64-tdep.c (sh64_register_name): Constify.
13497 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
13498 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
13499 * stabsread.c (patch_block_stabs, read_type_number)
13500 (ref_map::stabs, ref_add, process_reference)
13501 (symbol_reference_defined, define_symbol, define_symbol)
13502 (error_type, read_type, read_member_functions, read_cpp_abbrev)
13503 (read_one_struct_field, read_struct_fields, read_baseclasses)
13504 (read_tilde_fields, read_struct_type, read_array_type)
13505 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
13506 (read_huge_number, read_range_type, read_args, common_block_start)
13507 (find_name_end): Constify.
13508 * stabsread.h (common_block_start, define_symbol)
13509 (process_one_symbol, symbol_reference_defined, ref_add):
13510 * symfile.c (get_section_index, add_symbol_file_command):
13511 * symfile.h (get_section_index): Constify.
13512 * target-descriptions.c (tdesc_type::name): Constify.
13513 (tdesc_free_type): Add cast.
13514 * target.c (find_default_run_target):
13515 (add_deprecated_target_alias, find_default_run_target)
13516 (target_announce_detach): Constify.
13517 (do_option): Constify.
13518 * target.h (add_deprecated_target_alias): Constify.
13519 * thread.c (print_thread_info_1): Constify.
13520 * top.c (deprecated_readline_begin_hook, command_line_input):
13522 (init_main): Add casts.
13523 * top.h (handle_line_of_input): Constify.
13524 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
13525 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
13526 (tfind_command): Rename to ...
13527 (tfind_command_1): ... this and constify.
13528 (tfind_command): New function.
13529 (tfind_end_command, tfind_start_command): Adjust.
13530 (encode_source_string): Constify.
13531 * tracepoint.h (encode_source_string): Constify.
13532 * tui/tui-data.c (tui_partial_win_by_name): Constify.
13533 * tui/tui-data.h (tui_partial_win_by_name): Constify.
13534 * tui/tui-source.c (tui_set_source_content_nil): Constify.
13535 * tui/tui-source.h (tui_set_source_content_nil): Constify.
13536 * tui/tui-win.c (parse_scrolling_args): Constify.
13537 * tui/tui-windata.c (tui_erase_data_content): Constify.
13538 * tui/tui-windata.h (tui_erase_data_content): Constify.
13539 * tui/tui-winsource.c (tui_erase_source_content): Constify.
13540 * tui/tui.c (tui_enable): Add cast.
13541 * utils.c (defaulted_query): Constify.
13542 (init_page_info): Add cast.
13543 (puts_debug, subset_compare): Constify.
13544 * utils.h (subset_compare): Constify.
13545 * varobj.c (varobj_format_string): Constify.
13546 * varobj.h (varobj_format_string): Constify.
13547 * vax-tdep.c (vax_register_name): Constify.
13548 * windows-nat.c (windows_detach): Constify.
13549 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
13550 * xml-support.c (gdb_xml_end_element): Constify.
13551 * xml-tdesc.c (tdesc_start_reg): Constify.
13552 * xstormy16-tdep.c (xstormy16_register_name): Constify.
13553 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
13554 * xtensa-tdep.h (xtensa_register_t::name): Constify.
13556 2017-04-05 Pedro Alves <palves@redhat.com>
13558 * proc-api.c (struct trans): Constify.
13559 (procfs_note): Constify.
13560 * proc-events.c (struct trans, syscall_table):
13561 * proc-flags.c (struct trans): Constify.
13562 * proc-utils.h (procfs_note): Constify.
13563 * proc-why.c (struct trans): Constify.
13564 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
13565 (procfs_detach): Constify.
13566 * sol-thread.c (struct string_map): Constify.
13567 (td_err_string, td_state_string): Constify.
13569 2017-04-05 Pedro Alves <palves@redhat.com>
13571 * proc-api.c (procfs_filename): Don't initialize
13573 (prepare_to_trace): Assume procfs_filename is non-NULL.
13574 (_initialize_proc_api): Give procfs_filename a default value here.
13576 2017-04-05 Pedro Alves <palves@redhat.com>
13578 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
13579 'cond_string' parameter.
13580 (extract_exception_regexp): Constify 'string' parameter.
13581 (catch_exception_command_1): Constify.
13582 * breakpoint.c (init_catchpoint)
13583 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
13585 (ep_parse_optional_if_clause, catch_fork_command_1)
13586 (catch_exec_command_1): Constify.
13587 * breakpoint.h (init_catchpoint): Constify 'cond_string'
13589 (ep_parse_optional_if_clause): Constify.
13590 * cli/cli-utils.c (remove_trailing_whitespace)
13591 (check_for_argument): Constify.
13592 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
13593 non-const overload.
13594 (check_for_argument): Likewise.
13596 2017-04-05 Pedro Alves <palves@redhat.com>
13598 * event-top.c (command_line_handler): Add cast to execute_command
13600 * record-btrace.c (cmd_record_btrace_bts_start)
13601 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
13602 (cmd_record_btrace_start): Add cast to execute_command call.
13603 * record-full.c (record_full_goto_insn):
13604 * record.c (record_start, record_stop): Add cast to
13605 execute_command_to_string calls.
13606 (cmd_record_start): Add cast to execute_command calls.
13608 2017-04-05 Pedro Alves <palves@redhat.com>
13610 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
13611 static inline function.
13612 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
13613 array and use gdb_PyArg_ParseTupleAndKeywords.
13614 * python/py-cmd.c (cmdpy_init): Likewise.
13615 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
13616 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
13617 (infpy_search_memory): Likewise.
13618 * python/py-objfile.c (objfpy_add_separate_debug_file)
13619 (gdbpy_lookup_objfile): Likewise.
13620 * python/py-symbol.c (gdbpy_lookup_symbol)
13621 (gdbpy_lookup_global_symbol): Likewise.
13622 * python/py-type.c (gdbpy_lookup_type): Likewise.
13623 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
13624 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
13627 2017-04-05 Pedro Alves <palves@redhat.com>
13629 * python/python-internal.h (gdb_PyGetSetDef): New type.
13630 * python/py-block.c (block_object_getset)
13631 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
13632 * python/py-event.c (event_object_getset)
13633 (finish_breakpoint_object_getset): Likewise.
13634 * python/py-inferior.c (inferior_object_getset): Likewise.
13635 * python/py-infthread.c (thread_object_getset): Likewise.
13636 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
13637 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
13638 * python/py-objfile.c (objfile_getset): Likewise.
13639 * python/py-progspace.c (pspace_getset): Likewise.
13640 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
13642 * python/py-record.c (recpy_record_getset): Likewise.
13643 * python/py-symbol.c (symbol_object_getset): Likewise.
13644 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
13646 * python/py-type.c (type_object_getset, field_object_getset):
13648 * python/py-value.c (value_object_getset): Likewise.
13650 2017-04-05 Pedro Alves <palves@redhat.com>
13652 * python/python-internal.h (gdb_PyObject_CallMethod)
13653 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
13655 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
13656 (PySys_GetObject, PySys_SetPath): New macros.
13658 2017-04-05 Pedro Alves <palves@redhat.com>
13660 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
13661 info_osdata_command.
13662 * osdata.c (info_osdata_command): Rename to ...
13663 (info_osdata): ... this. Constify 'type' parameter, and remove
13664 the 'from_tty' parameter. Accept NULL TYPE.
13665 (info_osdata_command): New function.
13666 * osdata.h (info_osdata_command): Remove declaration.
13667 (info_osdata): New declaration.
13669 2017-04-05 Pedro Alves <palves@redhat.com>
13671 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
13672 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
13673 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
13675 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
13676 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
13677 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
13679 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
13680 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
13681 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
13682 (mi_cmd_file_list_exec_source_files)
13683 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
13684 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13685 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
13687 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
13688 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
13689 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
13690 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
13691 (mi_cmd_stack_info_frame): Constify 'command' parameter.
13692 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
13693 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
13694 'command' parameter.
13695 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
13696 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
13697 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
13698 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
13699 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
13700 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
13701 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
13702 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
13703 (mi_cmd_var_set_update_range): Constify 'command' parameter.
13704 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
13705 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
13707 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
13708 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
13709 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
13710 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
13711 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
13712 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
13713 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
13714 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
13715 (mi_cmd_data_list_changed_registers)
13716 (mi_cmd_data_write_register_values)
13717 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
13718 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
13719 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
13720 (mi_cmd_list_features, mi_cmd_list_target_features)
13721 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
13722 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
13723 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
13724 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
13725 (mi_cmd_trace_frame_collected): Constify 'command'
13727 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
13728 'command' parameter.
13730 2017-04-05 Pedro Alves <palves@redhat.com>
13732 * ada-lang.c (ada_completer_word_break_characters): Now a const
13734 (ada_get_gdb_completer_word_break_characters): Constify.
13735 * completer.c (gdb_completer_command_word_break_characters)
13736 (gdb_completer_file_name_break_characters)
13737 (gdb_completer_quote_characters): Now const arrays.
13738 (get_gdb_completer_quote_characters): Constify.
13739 (set_rl_completer_word_break_characters): New function.
13740 (set_gdb_completion_word_break_characters)
13741 (complete_line_internal): Use it.
13742 * completer.h (get_gdb_completer_quote_characters): Constify.
13743 (set_rl_completer_word_break_characters): Declare.
13744 * f-lang.c (f_word_break_characters): Constify.
13745 * language.c (default_word_break_characters): Constify.
13746 * language.h (language_defn::la_word_break_characters): Constify.
13747 (default_word_break_characters): Constify.
13748 * top.c (init_main): Use set_rl_completer_word_break_characters.
13750 2017-04-05 Pedro Alves <palves@redhat.com>
13752 * aix-thread.c (aix_thread_pid_to_str)
13753 (aix_thread_extra_thread_info): Constify.
13754 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
13755 * bsd-uthread.c (bsd_uthread_extra_thread_info)
13756 (bsd_uthread_pid_to_str): Constify.
13757 * corelow.c (core_pid_to_str): Constify.
13758 * darwin-nat.c (darwin_pid_to_str): Constify.
13759 * fbsd-nat.c (fbsd_pid_to_str): Constify.
13760 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
13762 * gnu-nat.c (gnu_pid_to_str): Constify.
13763 * go32-nat.c (go32_pid_to_str): Constify.
13764 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
13765 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
13766 * inferior.c (inferior_pid_to_str): Constify.
13767 * linux-nat.c (linux_nat_pid_to_str): Constify.
13768 * linux-tdep.c (linux_core_pid_to_str): Constify.
13769 * linux-thread-db.c (thread_db_pid_to_str)
13770 (thread_db_extra_thread_info): Constify.
13771 * nto-tdep.c (nto_extra_thread_info): Constify.
13772 * nto-tdep.h (nto_extra_thread_info): Constify.
13773 * obsd-nat.c (obsd_pid_to_str): Constify.
13774 * procfs.c (procfs_pid_to_str): Constify.
13775 * ravenscar-thread.c (ravenscar_extra_thread_info)
13776 (ravenscar_pid_to_str): Constify.
13777 * remote-sim.c (gdbsim_pid_to_str): Constify.
13778 * remote.c (remote_threads_extra_info, remote_pid_to_str):
13780 * sol-thread.c (solaris_pid_to_str): Constify.
13781 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
13782 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
13783 * target.c (default_pid_to_str, target_pid_to_str)
13784 (normal_pid_to_str, default_pid_to_str): Constify.
13785 * target.h (target_ops::to_pid_to_str)
13786 (target_ops::to_extra_thread_info): Constify.
13787 (target_pid_to_str, normal_pid_to_str): Constify.
13788 * windows-nat.c (windows_pid_to_str): Constify.
13789 * gdbarch.sh (core_pid_to_str): Constify.
13790 * target-delegates.c: Regenerate.
13791 * gdbarch.h, gdbarch.c: Regenerate.
13793 2017-04-05 Pedro Alves <palves@redhat.com>
13795 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
13796 the memory of the temporary warning_pre_print override.
13797 * utils.c (warning_pre_print): Constify.
13798 * utils.h (warning_pre_print): Constify.
13800 2017-04-05 Pedro Alves <palves@redhat.com>
13802 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
13803 (shell_command): New function.
13804 (make_command): Use std::string.
13805 (init_cli_cmds): Register shell_command instead of shell_escape.
13807 2017-04-05 Pedro Alves <palves@redhat.com>
13809 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
13810 * tracepoint.c (default_collect): Don't initialize.
13812 2017-04-05 Pedro Alves <palves@redhat.com>
13814 * macroexp.c (macro_buffer::shared): Now a bool.
13815 (init_buffer): Update.
13816 (init_shared_buffer): Constify 'addr' parameter.
13817 (substitute_args, expand, macro_expand, macro_expand_next): Remove
13820 2017-04-05 Pedro Alves <palves@redhat.com>
13822 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
13823 * disasm.c (set_disassembler_options): Constify local.
13824 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
13826 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
13829 * tracefile.c (tsave_command): Fix argument parsing for '-r'
13832 2017-04-05 Yao Qi <yao.qi@linaro.org>
13834 * frame.c (frame_unwind_register_unsigned): Call
13835 frame_unwind_register_value.
13837 2017-04-05 Yao Qi <yao.qi@linaro.org>
13839 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
13840 Use gdb_test_multiple, and don't match anchor.
13842 2017-04-05 Pedro Alves <palves@redhat.com>
13844 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
13845 (Write After Approval): Remove Simon Marchi.
13847 2017-04-05 Pedro Alves <palves@redhat.com>
13849 * common/gdb_optional.h (optional::optional): Make constexpr and
13850 initialize m_dummy.
13852 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13854 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13855 (amd64fbsd_jmp_buf_reg_offset): Remove.
13856 (amd64fbsd_supply_uthread): Remove function.
13857 (amd64fbsd_collect_uthread): Remove function.
13858 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
13859 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
13860 (x86_64-*-freebsd*): Remove bsd-uthread.o.
13861 (fbsd-nat.c): Update comment.
13862 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
13863 (i386fbsd_jmp_buf_reg_offset): Remove.
13864 (i386fbsd_supply_uthread): Remove function.
13865 (i386fbsd_collect_uthread): Remove function.
13866 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
13868 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13870 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
13871 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
13872 * NEWS: Mention that support for FreeBSD/alpha was removed.
13873 * alpha-fbsd-tdep.c: Delete file.
13874 * config/alpha/fbsd.mh: Delete file.
13875 * configure.host: Delete alpha*-*-freebsd* and
13876 alpha*-*-kfreebsd*-gnu.
13877 * configure.tgt: Delete alpha*-*-freebsd* and
13878 alpha*-*-kfreebsd*-gnu.
13880 2017-04-04 John Baldwin <jhb@FreeBSD.org>
13882 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
13883 amd64bsd_store_inferior_registers): Use ptid from regcache.
13885 2017-04-04 Pedro Alves <palves@redhat.com>
13887 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
13888 data fields, make them private and add "m_" prefixes.
13889 (lnp_state_machine::lnp_state_machine): New ctor.
13890 (record_line, check_line_address, handle_set_discriminator)
13891 (handle_set_address, handle_advance_pc, handle_special_opcode)
13892 (handle_advance_line, handle_set_file, handle_negate_stmt)
13893 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
13894 (end_sequence, advance_line): New methods.
13895 (m_gdbarch, m_record_lines_p): New fields.
13896 (lnp_reader_state): Delete.
13897 (dwarf_record_line): Rename to ...
13898 (lnp_state_machine::record_line): ... adjust.
13899 (init_lnp_state_machine): Delete.
13900 (lnp_state_machine::lnp_state_machine): New.
13901 (check_line_address): Rename to ...
13902 (lnp_state_machine::check_line_address): This.
13903 (dwarf_decode_lines_1): Remove reference to "reader_state".
13904 Adjust lnp_state_machine having a non-default ctor. Use bool.
13905 State machine internal state manipulation moved to
13906 lnp_state_machine methods.
13908 2017-04-04 Pedro Alves <palves@redhat.com>
13910 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13911 unittests/offset-type-selftests.c.
13912 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
13913 * common/offset-type.h: New file.
13914 * common/preprocessor.h: New file.
13915 * common/traits.h: New file.
13916 * common/valid-expr.h: New file.
13917 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
13918 sect_offset and cu_offset strong typedefs throughout.
13919 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
13920 typedefs throughout.
13921 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
13922 sect_offset and cu_offset strong typedefs throughout.
13923 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
13924 typedefs throughout.
13925 * gdbtypes.h: Include "common/offset-type.h".
13926 (cu_offset): Now an offset type (strong typedef) instead of a
13928 (sect_offset): Likewise.
13929 (union call_site_parameter_u): Rename "param_offset" field to
13931 * unittests/offset-type-selftests.c: New file.
13933 2017-04-04 Pedro Alves <palves@redhat.com>
13935 * common/underlying.h: New file.
13936 * dwarf2read.c: Include "common/gdb_optional.h" and
13937 "common/underlying.h".
13938 (dir_index, file_name_index): New types.
13939 (file_entry): Use them.
13940 (file_entry::include): Use to_underlying.
13941 (line_header::add_file_name): Use dir_index.
13942 (read_formatted_entries): Use gdb::optional. Read form before
13943 writting to file_entry.
13944 (dwarf_decode_line_header): Use dir_index.
13945 (lnp_state_machine::current_file): Use to_underlying.
13946 (lnp_state_machine::file): Change type to file_name_index.
13947 (dwarf_record_line): Use to_underlying.
13948 (init_lnp_state_machine): Use file_name_index.
13949 (dwarf_decode_lines_1): Use dir_index and file_name_index.
13951 2017-04-04 Pedro Alves <palves@redhat.com>
13953 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
13954 operator bool, has_value and get methods.
13956 2017-04-04 Pedro Alves <palves@redhat.com>
13958 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
13960 (line_header): Initialize all data fields. Change type of
13961 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
13962 Change type of include_dirs to std::vector<const char *>. Remove
13963 num_include_dirs, include_dirs_size. Change type of file_names to
13964 std::vector<file_entry>. Remove num_file_names, file_names_size.
13965 (line_header::line_header): New.
13966 (line_header::add_include_dir, line_header::add_file_name): New
13968 (line_header::include_dir_at): Remove NULL check.
13969 (line_header::file_name_at): Add const overload.
13970 (line_header_up): New unique_ptr typedef.
13971 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
13972 std::vector. Remove free_line_header call.
13973 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
13974 free_line_header call.
13975 (free_cu_line_header): Delete.
13976 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
13977 (setup_type_unit_groups): Use line_header_up instead of cleanups.
13978 Adjust to use std::vector.
13979 (free_line_header): Delete.
13980 (free_line_header_voidp): Use delete.
13981 (add_include_dir): Replace with ...
13982 (line_header::add_include_dir): ... this method. Use std::vector.
13983 (add_file_name): Replace with ...
13984 (line_header::add_file_name): ... this method. Use std::vector.
13985 (add_include_dir_stub): Delete.
13986 (read_formatted_entries): Remove memset.
13987 (dwarf_decode_line_header): Return a line_header_up instead of a
13988 raw pointer. Remove cleanup handling. Pass lambdas to
13989 read_formatted_entries. Adjust to use line_header methods.
13990 (dwarf_decode_lines_1): Adjust to use line_header methods.
13991 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
13994 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
13996 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
13997 instead of struct ptid.
13999 2017-05-04 Alan Hayward <alan.hayward@arm.com>
14001 * frame.c (get_frame_register_bytes): Unwind using value.
14002 (put_frame_register_bytes): Likewise.
14004 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14006 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14009 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14011 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14013 2017-03-29 Yao Qi <yao.qi@linaro.org>
14015 * gdbthread.h (struct thread_info): Declare constructor and
14016 destructor. Add some in-class member initializers.
14017 * thread.c (free_thread): Remove.
14018 (init_thread_list): Call delete instead of free_thread.
14019 (new_thread): Call thread_info constructor.
14020 (thread_info::thread_info): New function.
14021 (thread_info::~thread_info): New function.
14022 (delete_thread_1): Call delete instead of free_thread.
14023 (make_cleanup_restore_current_thread): Move tp and frame to
14026 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14028 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14029 (arc_skip_prologue): Likewise.
14030 (arc_make_frame_cache): Likewise.
14031 (arc_pv_get_operand): New function.
14032 (arc_is_in_prologue): Likewise.
14033 (arc_analyze_prologue): Likewise.
14034 (arc_print_frame_cache): Likewise.
14035 (MAX_PROLOGUE_LENGTH): New constant.
14037 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14039 * configure.tgt: Add arc-insn.o.
14040 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14041 (dump_arc_instruction_command): New function.
14042 (arc_fprintf_disasm): Likewise.
14043 (arc_disassemble_info): Likewise.
14044 (arc_insn_get_operand_value): Likewise.
14045 (arc_insn_get_operand_value_signed): Likewise.
14046 (arc_insn_get_memory_base_reg): Likewise.
14047 (arc_insn_get_memory_offset): Likewise.
14048 (arc_insn_get_branch_target): Likewise.
14049 (arc_insn_dump): Likewise.
14050 (arc_insn_get_linear_next_pc): Likewise.
14051 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14052 (arc_disassemble_info): Likewise.
14053 (arc_insn_get_branch_target): Likewise.
14054 (arc_insn_get_linear_next_pc): Likewise.
14055 * NEWS: Mention new "maint print arc arc-instruction".
14057 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14059 * arc-tdep (maintenance_print_arc_list): New variable.
14060 (maintenance_print_arc_command): New function.
14062 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14064 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14065 Add "limm" and "reserved".
14066 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14067 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14068 * arc-tdep.h (arc_regnum): Likewise.
14070 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14072 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14073 for THREADPTR register.
14074 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14076 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14077 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14078 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14080 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14082 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14083 registers above gdbarch_num_regs (gdbarch) as privileged in
14086 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14088 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14089 for a single specified register or for all registers in
14090 a0_base..a0_base + C0_NREGS range.
14091 (supply_gregset_reg): Call regcache_raw_supply for a single
14092 specified register or for all registers in a0_base..a0_base +
14095 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14097 * arch/xtensa.h (C0_NREGS): Add definition.
14098 * xtensa-tdep.c (C0_NREGS): Remove definition.
14100 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14102 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14103 Drop xtensa_default_isa initialization.
14104 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14106 2017-03-27 Pedro Alves <palves@redhat.com>
14108 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14109 (file_entry::include_dir): New method.
14110 (line_header::include_dir_at, line_header::file_name_at): New
14112 (setup_type_unit_groups, setup_type_unit_groups)
14113 (psymtab_include_file_name): Simplify using the new methods.
14114 (lnp_state_machine) <the_line_header>: New field.
14115 <file>: Add comment.
14116 (lnp_state_machine::current_file): New method.
14117 (dwarf_record_line): Simplify using the new methods.
14118 (init_lnp_state_machine): Initialize the "the_line_header" field.
14119 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14120 Simplify using the new methods.
14122 2017-03-27 Pedro Alves <palves@redhat.com>
14124 * cp-name-parser.y (make_empty): Delete.
14125 (demangler_special, nested_name, ptr_operator, array_indicator)
14126 (direct_declarator, declarator_1): Use fill_comp instead of
14129 2017-03-27 Pedro Alves <palves@redhat.com>
14131 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14132 to ATTRIBUTE_PRINTF.
14133 * solib-target.c (library_list_start_list): Print "string" not
14135 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14136 gdb_xml_error call.
14138 2017-03-27 Pedro Alves <palves@redhat.com>
14140 * dwarf2read.c (struct file_and_directory): New.
14141 (dwarf2_get_dwz_file): Adjust to use std::string.
14142 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14143 (find_file_and_directory): Adjust to return a file_and_directory
14145 (read_file_scope): Adjust to use file_and_directory. Remove
14146 make_cleanup/do_cleanups calls.
14147 (open_and_init_dwp_file): Adjust to use std::string. Remove
14148 make_cleanup/do_cleanups calls.
14149 * python/python.c (do_start_initialization): Adjust to ldirname
14150 returning a std::string.
14151 * utils.c (ldirname): Now returns a std::string.
14152 * utils.h (ldirname): Change return type to std::string.
14153 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14154 returning a std::string.
14155 * xml-tdesc.c (file_read_description_xml): Likewise.
14157 2017-03-24 Alan Hayward <alan.hayward@arm.com>
14159 * regcache.c (regcache_debug_print_register): New function.
14160 * regcache.h (regcache_debug_print_register): New declaration.
14161 * target.c (debug_print_register): Remove.
14162 (target_fetch_registers): Call regcache_debug_print_register.
14163 (target_store_registers): Likewise.
14165 2017-03-24 Pádraig Brady <pbrady@fb.com>
14167 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14168 reference beyond the 'lh->include_dirs' array before accessing to
14170 (psymtab_include_file_name): Likewise.
14171 (dwarf_decode_lines_1): Likewise.
14172 (dwarf_decode_lines): Likewise.
14173 (file_file_name): Likewise.
14175 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14177 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14179 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14180 ps_lsetfpregs): Likewise.
14181 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14182 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14183 ps_lsetfpregs): Likewise.
14184 * target.c (target_fetch_registers, target_store_registers):
14187 2017-03-23 Alan Hayward <alan.hayward@arm.com>
14189 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14191 2017-03-23 Yao Qi <yao.qi@linaro.org>
14193 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14194 (_initialize_aarch64_tdep): Register it.
14195 (aarch64_record_load_store): Handle PRFM instruction.
14196 (aarch64_process_record_test): New function.
14198 2017-03-23 Yao Qi <yao.qi@linaro.org>
14200 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14203 2017-03-23 Yao Qi <yao.qi@linaro.org>
14205 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14207 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14209 python/python.c (do_start_initialization): Fix memory leak.
14211 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14213 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14214 using get_ptrace_pid.
14215 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14217 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14218 inferior_ptid instead of pid.
14220 2017-03-22 Yao Qi <yao.qi@linaro.org>
14222 * aarch64-tdep.c: Wrap locally used classes in anonymous
14224 * arm-tdep.c: Likewise.
14225 * linespec.c: Likewise.
14226 * ui-out.c: Likewise.
14228 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
14231 * python/lib/gdb/printer/bound_registers.py: Import sys.
14233 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14235 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14236 windows_thread_info parameter and use it instead of
14238 (windows_fetch_inferior_registers): Don't set current_thread,
14239 pass the thread to do_windows_fetch_inferior_registers. Use
14240 ptid from regcache instead of inferior_ptid.
14241 (do_windows_store_inferior_registers): Add windows_thread_info
14242 parameter and use it instead of current_thread.
14243 (windows_store_inferior_registers): Don't set current_thread,
14244 pass the thread to do_windows_store_inferior_registers. Use
14245 ptid from regcache instead of inferior_ptid.
14247 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14249 * ser-mingw.c (ser_windows_raw): Remove reference to
14250 struct serial::current_timeout.
14252 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14255 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14256 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14257 (sparc64_fsr_type): Fix %fsr decoding.
14259 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14261 * python/py-record-btrace.c (btpy_insn_data): Change return type
14264 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14266 * spu-linux-nat.c (spu_fetch_inferior_registers,
14267 spu_store_inferior_registers): Use ptid from regcache, set and
14268 restore inferior_ptid.
14269 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14272 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14274 * i386-linux-nat.c (fetch_register, store_register,
14275 i386_linux_fetch_inferior_registers,
14276 i386_linux_store_inferior_registers): Use ptid from regcache.
14277 * ia64-linux-nat.c (ia64_linux_fetch_register,
14278 ia64_linux_store_register): Likewise.
14279 * inf-ptrace.c (inf_ptrace_fetch_register,
14280 inf_ptrace_store_register): Likewise.
14281 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14282 m32r_linux_store_inferior_registers): Likewise.
14283 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14284 m68kbsd_store_inferior_registers): Likewise.
14285 * m68k-linux-nat.c (fetch_register, store_register,
14286 m68k_linux_fetch_inferior_registers,
14287 m68k_linux_store_inferior_registers): Likewise.
14288 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14289 m88kbsd_store_inferior_registers): Likewise.
14290 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14291 mips_fbsd_store_inferior_registers): Likewise.
14292 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14293 mips64_linux_regsets_store_registers): Likewise.
14294 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14295 mipsnbsd_store_inferior_registers): Likewise.
14296 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14297 mips64obsd_store_inferior_registers): Likewise.
14298 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14300 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14301 ppcfbsd_store_inferior_registers): Likewise.
14302 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14303 ppc_linux_store_inferior_registers): Likewise.
14304 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14305 ppcnbsd_store_inferior_registers): Likewise.
14306 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14307 ppcobsd_store_registers): Likewise.
14308 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14310 * ravenscar-thread.c (ravenscar_fetch_registers,
14311 ravenscar_store_registers, ravenscar_prepare_to_store):
14313 * record-btrace.c (record_btrace_fetch_registers,
14314 record_btrace_store_registers, record_btrace_prepare_to_store):
14316 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14317 Lookup inferior using ptid from regcache, instead of
14319 * remote.c (remote_fetch_registers, remote_store_registers): Use
14320 ptid from regcache.
14321 * rs6000-nat.c (fetch_register, store_register): Likewise.
14322 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14323 s390_linux_store_inferior_registers): Likewise.
14324 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14325 shnbsd_store_inferior_registers): Likewise.
14326 * sol-thread.c (sol_thread_fetch_registers,
14327 sol_thread_store_registers): Likewise.
14328 * sparc-nat.c (sparc_fetch_inferior_registers,
14329 sparc_store_inferior_registers): Likewise.
14330 * tilegx-linux-nat.c (fetch_inferior_registers,
14331 store_inferior_registers): Likewise.
14332 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14333 vaxbsd_store_inferior_registers): Likewise.
14334 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14335 store_xtregs): Likewise.
14337 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14340 * NEWS: Mention support for rvalue references in GDB and python.
14341 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14342 supports both lvalue and rvalue references.
14344 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14347 * gdbtypes.c (rank_one_type): Implement overloading
14348 resolution rules regarding rvalue references.
14350 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14353 * aarch64-tdep.c (aarch64_type_align)
14354 (aarch64_extract_return_value, aarch64_store_return_value): Change
14355 lvalue reference type checks to general reference type checks.
14356 * amd64-tdep.c (amd64_classify): Likewise.
14357 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14359 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14360 (arm_store_return_value): Likewise.
14361 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14362 * c-typeprint.c (c_print_type): Likewise.
14363 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14364 (cplus_number_of_children, cplus_describe_child): Likewise.
14365 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14366 * completer.c (expression_completer): Likewise.
14367 * cp-support.c (make_symbol_overload_list_adl_namespace):
14369 * darwin-nat-info.c (info_mach_region_command): Likewise.
14370 * dwarf2loc.c (entry_data_value_coerce_ref)
14371 (value_of_dwarf_reg_entry): Likewise.
14372 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14373 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14375 * findvar.c (extract_typed_address, store_typed_address):
14377 * gdbtypes.c (rank_one_type): Likewise.
14378 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14379 * infcall.c (value_arg_coerce): Likewise.
14380 * language.c (pointer_type): Likewise.
14381 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14383 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14384 * mn10300-tdep.c (mn10300_type_align): Likewise.
14385 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14386 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14387 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14389 * printcmd.c (print_formatted, x_command): Likewise.
14390 * python/py-type.c (typy_get_composite, typy_template_argument):
14392 * python/py-value.c (valpy_referenced_value)
14393 (valpy_get_dynamic_type, value_has_field): Likewise.
14394 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14395 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14396 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14397 * spu-tdep.c (spu_scalar_value_p): Likewise.
14398 * symtab.c (lookup_symbol_aux): Likewise.
14399 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
14400 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
14402 * valops.c (value_cast_pointers, value_cast)
14403 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
14404 (value_struct_elt, value_struct_elt_bitpos)
14405 (value_find_oload_method_list, find_overload_match)
14406 (value_rtti_indirect_type): Likewise.
14407 * valprint.c (val_print_scalar_type_p, generic_val_print):
14409 * value.c (value_actual_type, value_as_address, unpack_long)
14410 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
14411 (coerce_ref): Likewise.
14412 * varobj.c (varobj_get_value_type): Likewise.
14414 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14417 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
14418 table of constants.
14419 * python/lib/gdb/command/explore.py: Support exploring values
14420 of rvalue reference types.
14421 * python/lib/gdb/types.py: Implement get_basic_type() for
14422 rvalue reference types.
14423 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
14425 * python/py-value.c (valpy_getitem): Add an rvalue reference
14427 (valpy_reference_value): Add new parameter "refcode".
14428 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
14429 New wrappers for valpy_reference_value().
14430 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14431 (gdbpy_invoke_xmethod): Likewise.
14433 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14436 * dwarf2read.c (process_die, read_type_die_1): Handle the
14437 DW_TAG_rvalue_reference_type DIE.
14438 (read_tag_reference_type): Add new parameter "refcode".
14440 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14443 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
14444 (c_type_print_modifier, c_type_print_varspec_suffix)
14445 (c_type_print_base): Support printing rvalue reference types.
14446 * c-valprint.c (c_val_print, c_value_print): Support printing
14447 rvalue reference values.
14449 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14452 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
14454 * cp-support.c (replace_typedefs): Handle
14455 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
14456 * python/py-type.c (typy_lookup_type): Likewise.
14458 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14461 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
14462 * parse.c (insert_type): Change assert statement.
14463 (follow_types): Handle rvalue reference types.
14464 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
14467 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14470 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
14471 value_ref() interface.
14472 * c-valprint.c (c_value_print): Likewise.
14473 * infcall.c (value_arg_coerce): Likewise.
14474 * python/py-value.c (valpy_reference_value): Likewise.
14475 * valops.c (value_cast, value_reinterpret_cast)
14476 (value_dynamic_cast, typecmp): Likewise.
14477 (value_ref): Parameterize by kind of return value reference type.
14478 * value.h (value_ref): Add new parameter "refcode".
14480 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14483 * dwarf2read.c (read_tag_reference_type): Use
14484 lookup_lvalue_reference_type() instead of lookup_reference_type().
14485 * eval.c (evaluate_subexp_standard): Likewise.
14486 * f-exp.y: Likewise.
14487 * gdbtypes.c (make_reference_type, lookup_reference_type):
14488 Generalize with rvalue reference types.
14489 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
14490 convenience wrappers for lookup_reference_type().
14491 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
14492 reference kind parameter.
14493 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
14494 wrappers for lookup_reference_type().
14495 * guile/scm-type.c (gdbscm_type_reference): Use
14496 lookup_lvalue_reference_type() instead of lookup_reference_type().
14497 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
14498 * parse.c (follow_types): Likewise.
14499 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
14500 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
14502 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
14503 (gdbpy_invoke_xmethod): Likewise.
14504 * stabsread.c: Provide extra argument to make_reference_type()
14506 * valops.c (value_ref, value_rtti_indirect_type): Use
14507 lookup_lvalue_reference_type() instead of lookup_reference_type().
14509 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14512 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
14513 (TYPE_IS_REFERENCE): New macro.
14514 (struct type): Add rvalue_reference_type field.
14515 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
14517 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14519 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
14520 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
14521 New function definition.
14522 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
14523 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
14524 New function declaration.
14525 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
14526 * mi/mi-interp.h: New file.
14527 * solib.c (info_sharedlibrary_command): Replace for loop with
14529 * solib.h (update_solib_list): New function declaration.
14530 (so_list_head): Move macro.
14531 * solist.h (ALL_SO_LIBS): New macro.
14533 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
14535 * infcmd.c (post_create_inferior): Remove unused argument in
14537 * remote.c (remote_start_remote): Likewise.
14538 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
14539 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
14540 (enable_break): Likewise.
14541 * solib.c (update_solib_list): Remove unused target argument
14542 and its documentation.
14543 (solib_add): Remove unused target argument. Remove unused
14544 argument in call to update_solib_list.
14545 (info_sharedlibrary_command): Remove unused argument in call
14546 to update_solib_list.
14547 (sharedlibrary_command): Remove unused argument in call to
14549 (handle_solib_event): Likewise.
14550 (reload_shared_libraries): Likewise.
14551 * solib.h (solib_add): Remove unused target argument.
14553 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
14555 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
14556 (s390_displaced_step_fixup): Cover relative branches with the
14557 default fixup handling. This fixes lack of support for some
14558 relative branch instructions.
14560 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14562 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
14563 ptid from regcache.
14565 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14567 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
14568 i386_darwin_store_inferior_registers): Use ptid from regcache.
14570 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14572 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
14573 i386bsd_store_inferior_registers): Use ptid from regcache.
14575 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14577 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
14578 hppaobsd_store_registers): Use ptid from regcache.
14580 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14582 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
14583 hppanbsd_store_registers): Use ptid from regcache.
14585 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14587 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
14588 from regcache. Use get_ptrace_pid.
14590 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14592 * corelow.c (get_core_register_section): Use ptid from regcache,
14595 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14597 * bsd-uthread.c (bsd_uthread_fetch_registers,
14598 bsd_uthread_store_registers): Use ptid from regcache, set and
14599 restore inferior_ptid.
14601 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14603 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
14604 fetch_fp_regs, store_register, store_regs, store_fp_register,
14605 store_fp_regs): Use ptid from regcache.
14607 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
14609 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
14610 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
14611 store_vfp_regs): Use ptid from regcache.
14613 2017-03-17 Pedro Alves <palves@redhat.com>
14616 * ser-base.c (ser_base_wait_for): Add comment.
14617 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
14619 * ser-unix.c (hardwire_raw): Remove reference to
14620 scb->current_timeout.
14621 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
14622 (hardwire_ops): Install ser_base_readchar instead of
14624 * serial.h (struct serial) <current_timeout, timeout_remaining>:
14627 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
14630 * python/lib/gdb/printer/bound_registers.py: Add support for
14633 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
14635 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
14636 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
14637 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
14638 byte_offset to subobj_byte_offset. Fix the handling of
14639 DWARF_VALUE_STACK on big-endian targets when coming via an
14641 (dwarf2_evaluate_loc_desc): Adjust call to
14642 dwarf2_evaluate_loc_desc_full.
14643 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
14644 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
14646 2017-03-16 Yao Qi <yao.qi@linaro.org>
14648 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
14649 and REVSH instructions.
14651 2017-03-16 Yao Qi <yao.qi@linaro.org>
14653 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
14654 (arm_record_test): Declare.
14655 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
14656 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
14657 align with the manual.
14658 (thumb_record_misc): Adjust the code order to align with the
14660 (thumb2_record_decode_insn_handler): Fix instruction matching.
14661 (instruction_reader_thumb): New class.
14662 (arm_record_test): New function.
14664 2017-03-16 Yao Qi <yao.qi@linaro.org>
14666 * arm-tdep.c (abstract_memory_reader): New class.
14667 (instruction_reader): New class.
14668 (extract_arm_insn): Add argument 'reader'. Callers updated.
14669 (decode_insn): Likewise.
14671 2017-03-16 Doug Evans <dje@google.com>
14673 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
14674 member. Change type of TYPE member to SCM. All uses updated.
14675 (lsscm_make_lazy_string_smob): Add assert.
14676 (lsscm_make_lazy_string): Flag bad length values.
14677 (lsscm_elt_type): New function.
14678 (gdbscm_lazy_string_to_value): Rewrite to use
14679 lsscm_safe_lazy_string_to_value.
14680 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
14681 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
14682 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
14684 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14685 * guile/scm-type.c (tyscm_scm_to_type): New function.
14687 2017-03-15 Doug Evans <dje@google.com>
14689 PR python/17728, python/18439, python/18779
14690 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
14691 member. Change type of TYPE member to PyObject *. All uses updated.
14692 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
14693 (gdbpy_create_lazy_string_object): Flag bad length values.
14694 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
14695 Handle typedefs in incoming type.
14696 (stpy_lazy_string_elt_type): New function.
14697 (gdbpy_extract_lazy_string): Call it.
14698 * python/py-value.c (valpy_lazy_string): Flag bad length values.
14699 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
14700 typedefs in incoming type.
14702 2017-03-16 Doug Evans <dje@google.com>
14704 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
14705 * guile/scm-type.c (tyscm_scm_to_type): New function.
14707 2017-03-16 Jiong Wang <jiong.wang@arm.com>
14709 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
14710 "ULONGEST" for "skip".
14712 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14715 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
14716 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
14717 (inf_ptrace_peek_poke): ...here. New function. Now also loop
14718 over ptrace peek/poke until end of buffer or error.
14720 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
14722 * parse.c (length_of_subexp): Make static.
14723 * parser-defs.h (length_of_subexp): Remove.
14725 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
14727 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
14730 2017-03-14 Pedro Alves <palves@redhat.com>
14732 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
14733 (main): Use std::unique_ptr. Remove calls to
14734 cp_demangled_name_parse_free.
14736 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14738 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
14739 alphabsd_store_inferior_registers): Use regcache->ptid instead
14742 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14744 * aix-thread.c (aix_thread_fetch_registers,
14745 aix_thread_store_registers): Use regcache->ptid instead of
14748 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14750 * aarch64-linux-nat.c (fetch_gregs_from_thread,
14751 store_gregs_to_thread, fetch_fpregs_from_thread,
14752 store_fpregs_to_thread): Use regcache->ptid instead of
14755 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14757 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
14758 amd64_linux_fetch_inferior_registers): Use regcache->ptid
14759 instead of inferior_ptid.
14761 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14763 * target.c (target_fetch_registers, target_store_registers): Add
14766 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
14768 * regcache.h (regcache_get_ptid): New function.
14769 * regcache.c (regcache_get_ptid): New function.
14771 2017-03-13 Mark Wielaard <mark@klomp.org>
14773 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
14775 2017-03-10 Keith Seitz <keiths@redhat.com>
14778 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
14780 2017-03-08 Pedro Alves <palves@redhat.com>
14783 * infrun.c (start_step_over, do_target_resume, resume)
14784 (restart_threads): Assert we're not resuming a thread that is
14785 meant to be stopped.
14786 (infrun_thread_stop_requested_callback): Delete.
14787 (infrun_thread_stop_requested): If the thread is internally
14788 stopped, queue a pending stop event and clear the thread's
14789 inline-frame state.
14790 (handle_stop_requested): New function.
14791 (handle_syscall_event, handle_inferior_event_1): Use
14792 handle_stop_requested.
14793 (handle_stop_requested): New function.
14794 (handle_signal_stop): Set the thread's stop_signal here instead of
14796 (finish_step_over): Clear step over info unconditionally.
14797 (handle_signal_stop): If the user had interrupted the event
14798 thread, consider the stop a random signal.
14799 (handle_signal_stop) <signal arrived while stepping over
14800 breakpoint>: Don't restart threads here.
14801 (stop_waiting): Don't clear step-over info here.
14803 2017-03-08 Pedro Alves <palves@redhat.com>
14806 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
14807 goes to argument 2, not 1.
14809 2017-03-08 Pedro Alves <palves@redhat.com>
14812 * top.c (gdb_readline_wrapper): Avoid passing NULL to
14813 display_gdb_prompt.
14814 (command_line_input): Add comment.
14816 2017-03-08 Pedro Alves <palves@redhat.com>
14819 * tui/tui-file.c (tui_file::write): New.
14820 * tui/tui-file.h (tui_file): Override "write".
14821 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
14822 factored out from ...
14823 (tui_puts): ... here.
14824 (tui_putc): Use them.
14825 (tui_write): New function.
14826 * tui/tui-io.h (tui_write): Declare.
14828 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
14830 * Makefile.in (SFILES): Replace "environ.c" with
14831 "common/environ.c".
14832 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
14833 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
14835 * common/environ.c: ... here.
14836 * environ.h: Moved to...
14837 * common/environ.h: ... here.
14839 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14841 * gdbarch.sh (pstring_ptr): New static function.
14842 (gdbarch_disassembler_options): Use it.
14843 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
14844 not valid_disassembler_option->name.
14845 * gdbarch.c: Regenerate.
14847 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
14849 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
14851 2017-03-07 Pedro Alves <palves@redhat.com>
14853 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
14855 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
14857 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
14858 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
14859 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
14860 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
14862 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
14864 * xtensa-linux-nat.c (fetch_gregs): Remove const.
14866 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
14868 * remote.c (remote_add_target_side_commands): Use range-based
14871 2017-03-03 Yao Qi <yao.qi@linaro.org>
14874 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
14876 * valprint.c (common_val_print): Likewise.
14878 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
14880 * NEWS: Mention new set/show disassembler-options commands.
14881 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
14882 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
14883 (prospective_options): New static variable.
14884 (gdb_disassembler::gdb_disassembler): Initialize
14885 m_di.disassembler_options.
14886 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
14887 (get_disassembler_options): New function.
14888 (set_disassembler_options): Likewise.
14889 (set_disassembler_options_sfunc): Likewise.
14890 (show_disassembler_options_sfunc): Likewise.
14891 (disassembler_options_completer): Likewise.
14892 (_initialize_disasm): Likewise.
14893 * disasm.h (get_disassembler_options): New prototype.
14894 (set_disassembler_options): Likewise.
14895 * gdbarch.sh (gdbarch_disassembler_options): New variable.
14896 (gdbarch_verify_disassembler_options): Likewise.
14897 * gdbarch.c: Regenerate.
14898 * gdbarch.h: Likewise.
14899 * arm-tdep.c (num_disassembly_options): Delete.
14900 (set_disassembly_style): Likewise.
14901 (arm_disassembler_options): New static variable.
14902 (set_disassembly_style_sfunc): Convert short style name into long
14903 option name. Call set_disassembler_options.
14904 (show_disassembly_style_sfunc): New function.
14905 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
14906 set_gdbarch_verify_disassembler_options.
14907 (_initialize_arm_tdep): Delete regnames variable and update callers.
14908 (arm_disassembler_options): Initialize.
14909 (disasm_options): New variable.
14910 (num_disassembly_options): Rename from this...
14911 (num_disassembly_styles): ...to this. Compute by scanning through
14913 (valid_disassembly_styles): Initialize using disasm_options.
14914 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
14915 set_arm_regname_option.
14916 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
14917 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
14918 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
14919 set_gdbarch_verify_disassembler_options.
14920 * s390-tdep.c (s390_disassembler_options): New static variable.
14921 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
14922 set_gdbarch_verify_disassembler_options.
14924 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14926 * remote.c (remote_add_target_side_condition): Remove "struct"
14927 keyword from range-based for loop.
14929 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
14931 * remote.c (remote_add_target_side_condition): Use range-based
14932 for loop. Update comment.
14934 2017-02-27 Yao Qi <yao.qi@linaro.org>
14936 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
14938 2017-02-26 Alan Hayward <alan.hayward@arm.com>
14940 * regcache.c (regcache_raw_update): New function.
14941 (regcache_raw_read): Move code to regcache_raw_update.
14942 * regcache.h (regcache_raw_update): New declaration.
14943 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
14945 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
14947 * dwarf2read.c (create_debug_type_hash_table): Initialize
14948 header.signature and header.type_offset_in_tu.
14950 2017-02-24 Pedro Alves <palves@redhat.com>
14952 * symtab.c (make_file_symbol_completion_list_1): Use
14953 add_symtab_completions.
14955 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14957 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
14959 2017-02-24 Alan Hayward <alan.hayward@arm.com>
14961 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
14962 I386_MAX_REGISTER_SIZE.
14963 (i386_pseudo_register_write): Likewise.
14964 (i386_process_record): Likewise.
14965 * i387-tdep.c (i387_supply_xsave): Likewise.
14966 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
14967 (store_register): Likewise.
14969 2017-02-23 Pedro Alves <palves@redhat.com>
14971 * ada-lang.c: Include "common/function-view.h".
14972 (ada_iterate_over_symbols): Adjust to use function_view as
14974 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
14975 (ada_make_symbol_completion_list): Use a lambda.
14976 (ada_exc_search_name_matches): Delete.
14977 (name_matches_regex): New.
14978 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
14979 * compile/compile-c-support.c: Include "common/function-view.h".
14980 (print_one_macro): Change prototype to accept a ui_file pointer.
14981 (write_macro_definitions): Use a lambda.
14982 * dwarf2read.c: Include "common/function-view.h".
14983 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
14984 (dw2_expand_symtabs_matching): Adjust to use function_view as
14986 * language.h: Include "common/function-view.h".
14987 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
14988 function_view as callback type.
14989 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
14990 * linespec.c: Include "common/function-view.h".
14991 (collect_info::add_symbol): New method.
14992 (struct symbol_and_data_callback, iterate_inline_only, struct
14993 symbol_matcher_data, iterate_name_matcher): Delete.
14994 (iterate_over_all_matching_symtabs): Adjust to use function_view
14995 as callback type and lambdas.
14996 (iterate_over_file_blocks): Adjust to use function_view as
14998 (decode_compound_collector): Now a class with private fields.
14999 (decode_compound_collector::release_symbols): New method.
15000 (collect_one_symbol): Rename to...
15001 (decode_compound_collector::operator()): ... this and adjust.
15002 (lookup_prefix_sym): decode_compound_collector construction bits
15003 move to decode_compound_collector ctor. Pass the
15004 decode_compound_collector object directly as callback. Remove
15005 cleanups and use decode_compound_collector::release_symbols
15007 (symtab_collector): Now a class with private fields.
15008 (symtab_collector::release_symtabs): New method.
15009 (add_symtabs_to_list): Rename to...
15010 (symtab_collector::operator()): ... this and adjust.
15011 (collect_symtabs_from_filename): symtab_collector construction
15012 bits move to symtab_collector ctor. Pass the symtab_collector
15013 object directly as callback. Remove cleanups and use
15014 symtab_collector::release_symtabs instead.
15015 (collect_symbols): Delete.
15016 (add_matching_symbols_to_info): Use lambdas.
15017 * macrocmd.c (print_macro_callback): Delete.
15018 (info_macro_command): Use a lambda.
15019 (info_macros_command): Pass print_macro_definition as callable
15021 (print_one_macro): Remove 'ignore' parameter.
15022 (macro_list_command): Adjust.
15023 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15024 (macro_for_each_data::user_data): Delete field.
15025 (foreach_macro): Adjust to call the function_view.
15026 (macro_for_each): Adjust to use function_view as callback type.
15027 (foreach_macro_in_scope): Adjust to call the function_view.
15028 (macro_for_each_in_scope): Adjust to use function_view as callback
15030 * macrotab.h: Include "common/function-view.h".
15031 (macro_callback_fn): Declare a prototype instead of a pointer.
15032 Remove "user_data" parameter.
15033 (macro_for_each, macro_for_each_in_scope): Adjust to use
15034 function_view as callback type.
15035 * psymtab.c (partial_map_expand_apply)
15036 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15037 Adjust to use function_view as callback type and to return bool.
15038 (psym_expand_symtabs_matching): Adjust to use function_view as
15040 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15041 to use function_view as callback type and to return bool.
15042 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15044 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15046 * symfile.h: Include "common/function-view.h".
15047 (expand_symtabs_file_matcher_ftype)
15048 (expand_symtabs_symbol_matcher_ftype)
15049 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15051 (quick_symbol_functions::map_symtabs_matching_filename)
15052 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15053 function_view as callback type and return bool.
15054 (expand_symtabs_matching): Adjust to use function_view as callback
15056 (maintenance_expand_name_matcher)
15057 (maintenance_expand_file_matcher): Delete.
15058 (maintenance_expand_symtabs): Use lambdas.
15059 * symtab.c (iterate_over_some_symtabs): Adjust to use
15060 function_view as callback types and return bool.
15061 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15063 (lookup_symtab_callback): Delete.
15064 (lookup_symtab): Use a lambda.
15065 (iterate_over_symbols): Adjust to use function_view as callback
15067 (struct search_symbols_data, search_symbols_file_matches)
15068 (search_symbols_name_matches): Delete.
15069 (search_symbols): Use a pair of lambdas.
15070 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15071 (symtab_expansion_callback): Delete.
15072 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15073 * symtab.h: Include "common/function-view.h".
15074 (iterate_over_some_symtabs): Adjust to use function_view as
15075 callback type and return bool.
15076 (iterate_over_symtabs): Adjust to use function_view as callback
15078 (symbol_found_callback_ftype): Remove 'data' parameter and return
15080 (iterate_over_symbols): Adjust to use function_view as callback
15083 2017-02-23 Pedro Alves <palves@redhat.com>
15085 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15086 (%.o) <unittests/%.c>: New pattern.
15087 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15088 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15089 * common/function-view.h: New file.
15090 * unittests/function-view-selftests.c: New file.
15091 * configure: Regenerate.
15093 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15095 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15097 * go32-nat.c (go32_thread_alive): Likewise.
15099 2017-02-23 Yao Qi <yao.qi@linaro.org>
15101 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15104 2017-02-23 Yao Qi <yao.qi@linaro.org>
15106 * varobj.c (varobj_clear_saved_item): Use delete instead of
15108 (update_dynamic_varobj_children): Likewise.
15110 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15112 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15114 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15116 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15117 m_enum_value to 0 in default constructor.
15119 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15121 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15122 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15123 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15124 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15125 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15126 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15127 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15128 IS_STORE_CONDITIONAL_INSN.
15130 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15132 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15134 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15136 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15138 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15140 * dwarf2read.c (skip_one_die, read_attribute_value)
15141 (dwarf2_const_value_attr, dump_die_shallow)
15142 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15143 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15145 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15147 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15148 (dwarf_parse_macro_header): Accept DWARF version 5.
15149 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15151 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15153 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15155 * common/common-exceptions.h (enum errors): Likewise.
15156 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15157 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15158 (dwarf_expr_context::execute_stack_op): Likewise.
15159 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15161 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15162 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15163 (show_entry_values_debug, call_site_to_target_addr)
15164 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15165 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15166 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15167 (value_of_dwarf_block_entry, indirect_pieced_value)
15168 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15169 (disassemble_dwarf_expression): Likewise.
15170 * dwarf2read.c (process_die, inherit_abstract_dies)
15171 (read_call_site_scope): Likewise.
15172 * gdbtypes.h (struct func_type, struct call_site_parameter)
15173 (struct call_site): Likewise.
15174 * stack.c (read_frame_arg): Likewise.
15175 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15177 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15179 * defs.h (read_unsigned_leb128): New declaration.
15180 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15181 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15182 (dwarf2_find_location_expression): Call also
15183 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15184 * dwarf2loc.h (dwarf2_version): New declaration.
15185 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15187 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15189 (struct dwop_section_names): Add loclists_dwo.
15190 (dwop_section_names): Add .debug_loclists.dwo.
15191 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15192 (struct dwarf2_per_cu_data): Add dwarf_version.
15193 (struct dwo_sections): Add loclists.
15194 (struct attr_abbrev): Add implicit_const.
15195 (read_indirect_line_string): New declaration.
15196 (read_unsigned_leb128): Delete declaration.
15197 (rcuh_kind): New definition.
15198 (read_and_check_comp_unit_head): Change parameter
15199 is_debug_types_section to section_kind.
15200 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15201 (read_comp_unit_head): Change parameter abfd to section, add parameter
15202 section_kind. Handle DWARF-5.
15203 (error_check_comp_unit_head): Accept also DWARF version 5.
15204 (read_and_check_comp_unit_head): Change parameter
15205 is_debug_types_section to section_kind.
15206 (read_and_check_type_unit_head): Delete function.
15207 (read_abbrev_offset): Handle DWARF-5.
15208 (create_debug_type_hash_table): Add parameter section_kind. Process
15209 only DW_UT_type. Use signature and type_offset_in_tu from struct
15211 (create_debug_types_hash_table): Update create_debug_type_hash_table
15213 (create_all_type_units): Call create_debug_type_hash_table.
15214 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15215 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15217 (skip_one_die): Handle DW_FORM_implicit_const.
15218 (dwarf2_rnglists_process): New function.
15219 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15220 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15221 (read_attribute_value): Handle DW_FORM_implicit_const,
15223 (read_attribute): Handle DW_FORM_implicit_const.
15224 (read_indirect_string_at_offset_from): New function from
15225 read_indirect_string_at_offset.
15226 (read_indirect_string_at_offset): Call
15227 read_indirect_string_at_offset_from.
15228 (read_indirect_line_string_at_offset): New function.
15229 (read_indirect_string): New function comment.
15230 (read_indirect_line_string): New function.
15231 (read_unsigned_leb128): Make it global.
15232 (dwarf2_string_attr): Handle DWARF-5.
15233 (add_include_dir_stub, read_formatted_entries): New functions.
15234 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15236 (per_cu_header_read_in): Update read_comp_unit_head caller.
15237 (dwarf2_version): New function.
15238 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15240 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15243 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15245 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15247 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15249 * dwarf2read.c (dwarf2_ranges_process): New function from
15250 dwarf2_ranges_read.
15251 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15252 dwarf2_ranges_process.
15254 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15256 * dwarf2read.c (create_debug_type_hash_table): New function from
15257 create_debug_types_hash_table.
15258 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15259 (create_all_type_units, open_and_init_dwo_file): Update
15260 create_debug_types_hash_table callers.
15262 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15265 * fork-child.c (trace_start_error): Fix thinko. va_end should
15266 refer to 'ap', not 'args'.
15268 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15269 Pedro Alves <palves@redhat.com>
15272 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15274 * fork-child.c (trace_start_error): New function.
15275 (trace_start_error_with_name): Likewise.
15276 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15277 * inf-ptrace.c (inf_ptrace_me): Likewise.
15278 * inferior.h (trace_start_error): New prototype.
15279 (trace_start_error_with_name): Likewise.
15281 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15284 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15285 NULL before using it.
15286 * symmisc.c (maintenance_print_symbols): Likewise.
15287 (maintenance_print_msymbols): Likewise.
15289 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15291 * NEWS: Add record Python bindings entry.
15293 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15295 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15297 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15298 * python/py-record-btrace.c, python/py-record-btrace.h,
15299 python/py-record-full.c, python/py-record-full.h: New file.
15300 * python/py-record.c: Add include for py-record-btrace.h and
15302 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15303 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15304 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15305 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15307 (gdbpy_initialize_btrace): New export.
15308 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15310 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15312 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15313 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15314 * python/py-record.c: New file.
15315 * python/python-internal.h (gdbpy_start_recording,
15316 gdbpy_current_recording, gdpy_stop_recording,
15317 gdbpy_initialize_record): New export.
15318 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15319 (python_GdbMethods): Add gdbpy_start_recording,
15320 gdbpy_current_recording and gdbpy_stop_recording.
15322 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15324 * record-btrace.c (record_btrace_record_method): New function.
15325 (init_record_btrace_ops): Initialize to_record_method.
15326 * record-full.c (record_full_record_method): New function.
15327 (init_record_full_ops, init_record_full_core_ops): Add
15328 record_full_record_method.
15329 * record.h (enum record_method): New enum.
15330 * target-debug.h (target_debug_print_enum_record_method: New define.
15331 * target-delegates.c: Regenerate.
15332 * target.c (target_record_method): New function.
15333 * target.h: Include record.h.
15334 (struct target_ops) <to_record_method>: New field.
15335 (target_record_method): New export.
15337 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15339 * record.h (record_start, record_stop): New export.
15340 * record.c (record_start, record_stop): New function.
15342 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15344 * btrace.c (btrace_fetch): Copy function call segments pointer
15346 (btrace_clear): Clear the vector.
15347 (btrace_find_insn_by_number): Use binary search to find the correct
15348 function call segment.
15349 * btrace.h (brace_fun_p): New typedef.
15350 (struct btrace_thread_info) <functions>: New field.
15352 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15354 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15355 * btrace.c (btrace_decode_error): ... here. New function.
15356 * btrace.h (btrace_decode_error): New export.
15358 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15360 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15361 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15362 btrace_find_insn_by_number): Remove special case for gaps.
15363 * btrace.h (btrace_insn_get_error): New export.
15364 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15365 * record-btrace.c (btrace_insn_history): Print number for gaps.
15366 (record_btrace_info, record_btrace_goto): Handle gaps.
15368 2017-02-14 Tom Tromey <tom@tromey.com>
15371 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15373 * python/py-evts.c (gdbpy_initialize_py_events): Add
15374 before_prompt registry.
15375 * python/py-events.h (events_object) <before_prompt>: New field.
15377 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15379 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15381 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
15383 * symfile (_initialize_symfile): Add usage text to the load command's
15386 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15388 * utils.c (defaulted_query): Don't query on secondary UIs.
15390 2017-02-10 Tom Tromey <tom@tromey.com>
15392 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15394 2017-02-10 Tom Tromey <tom@tromey.com>
15396 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15398 * python/py-type.c (typy_legacy_template_argument): Remove
15399 unnecessary "cleanup" local.
15401 2017-02-10 Tom Tromey <tom@tromey.com>
15403 * python/python.c (do_start_initialization): New function, from
15404 _initialize_python.
15405 (_initialize_python): Call do_start_initialization.
15406 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
15409 2017-02-10 Tom Tromey <tom@tromey.com>
15411 * python/py-prettyprint.c (pretty_print_one_value): Use
15414 2017-02-10 Tom Tromey <tom@tromey.com>
15416 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
15417 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
15419 * python/py-type.c (field_new): Use gdbpy_ref.
15420 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
15422 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
15423 (py_free_pspace): Likewise.
15424 (pspace_to_pspace_object): Likewise.
15425 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
15426 (py_free_objfile): Likewise.
15427 (objfile_to_objfile_object): Likewise.
15428 * python/py-inferior.c (delete_thread_object): Use
15430 (infpy_read_memory): Likewise.
15431 (py_free_inferior): Likewise.
15432 * python/py-evtregistry.c (create_eventregistry_object): Use
15434 * python/py-event.c (create_event_object): Use gdbpy_ref.
15436 2017-02-10 Tom Tromey <tom@tromey.com>
15438 * python/py-ref.h (gdbpy_ref_policy): Now a template.
15439 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
15441 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
15442 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
15443 python/py-exitedevent.c, python/py-finishbreakpoint.c,
15444 python/py-framefilter.c, python/py-function.c,
15445 python/py-inferior.c, python/py-infevents.c,
15446 python/py-linetable.c, python/py-newobjfileevent.c,
15447 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
15448 python/py-signalevent.c, python/py-stopevent.c,
15449 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
15450 python/py-unwind.c, python/py-utils.c, python/py-value.c,
15451 python/py-varobj.c, python/py-xmethods.c, python/python.c,
15452 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
15454 2017-02-10 Tom Tromey <tom@tromey.com>
15456 * ui-out.h (ui_out_emit_type): New class.
15457 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
15458 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
15459 and ui_out_emit_tuple.
15460 (enumerate_locals): Likewise.
15461 (py_mi_print_variables, py_print_locals, py_print_args): Use
15463 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
15465 * common/gdb_optional.h: New file.
15467 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15469 * MAINTAINERS (Write After Approval): Update my e-mail address.
15471 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
15474 * breakpoint.c (_initialize_breakpoint): Update the help description
15475 of the 'commands' command to indicate that it takes a list argument.
15477 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
15479 * interps.c (current_interp_set_logging): Remove "return".
15481 2017-02-09 Gary Benson <gbenson@redhat.com>
15483 * symtab.c (add_symtab_completions): Prevent NULL pointer
15486 2017-02-08 Pedro Alves <palves@redhat.com>
15488 * interps.c (interp::interp): Remove reference to quiet_p.
15489 (interp_set): Make static. Remove dead "Switching to" output
15491 (interp_quiet_p, interp_set_quiet): Delete.
15492 (interpreter_exec_cmd): Don't set the interpreter quiet.
15493 * interps.h (interp_quiet_p): Make static.
15494 (class interp) <quiet_p>: Remove field
15496 2017-02-08 Jerome Guitton <guitton@adacore.com>
15498 * cli/cli-decode.c (find_command_name_length): Make it extern.
15499 * cli/cli-decode.h (find_command_name_length): Declare.
15500 * cli/cli-script.c (command_name_equals, line_first_arg):
15502 (process_next_line): Use cli-decode to parse command names.
15503 (build_command_line): Make args a constant pointer.
15505 2017-02-08 Jerome Guitton <guitton@adacore.com>
15507 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
15508 Remove case-insensitive search.
15510 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
15512 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
15513 at the end of the line. Avoids an ARI warning.
15515 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
15517 * NEWS: Mention support for record/replay of Intel 64 rdrand and
15518 rdseed instructions.
15519 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
15521 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
15524 Provide and use sparc32 and sparc64 target description XML files.
15525 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
15526 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
15527 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
15528 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
15529 * features/sparc/sparc32-solaris.xml: New file.
15530 * features/sparc/sparc64-solaris.xml: New file.
15531 * features/sparc/sparc32-solaris.c: Generated.
15532 * features/sparc/sparc64-solaris.c: Generated.
15533 * sparc-tdep.h: Account for differences in target descriptions.
15534 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
15535 (sparc32_register_type): Use target provided registers.
15536 (validate_tdesc_registers): New function.
15537 (sparc32_gdbarch_init): Use tdesc_has_registers.
15538 Set pseudoregister functions.
15539 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
15540 (sparc64_register_type): Use target provided registers.
15541 (sparc64_init_abi): Set pseudoregister functions.
15543 2017-02-03 Tom Tromey <tom@tromey.com>
15546 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
15547 with a single member.
15549 2017-02-03 Pedro Alves <palves@redhat.com>
15551 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
15552 (cli_interp_base::~cli_interp_base): New.
15553 (cli_interp): New struct.
15554 (as_cli_interp): Cast the interp itself to cli_interp.
15555 (cli_interpreter_pre_command_loop): Rename to ...
15556 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
15558 (cli_interpreter_init): Rename to ...
15559 (cli_interp::init): ... this. Remove 'self' parameter. Use
15560 boolean. Make extern.
15561 (cli_interpreter_resume): Rename to ...
15562 (cli_interp::resume): ... this. Remove 'data' parameter. Make
15564 (cli_interpreter_suspend): Rename to ...
15565 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
15567 (cli_interpreter_exec): Rename to ...
15568 (cli_interp::exec): ... this. Remove 'data' parameter. Make
15570 (cli_interpreter_supports_command_editing): Rename to ...
15571 (cli_interp_base::supports_command_editing): ... this. Remove
15572 'interp' parameter. Make extern.
15573 (cli_ui_out): Rename to ...
15574 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
15576 (cli_set_logging): Rename to ...
15577 (cli_interp_base::set_logging): ... this. Remove 'interp'
15578 parameter. Make extern.
15579 (cli_interp_procs): Delete.
15580 (cli_interp_factory): Adjust to use "new".
15581 * cli/cli-interp.h: Include "interps.h".
15582 (struct cli_interp_base): New struct.
15583 * interps.c (struct interp): Delete. Fields moved to interps.h.
15584 (interp_new): Delete.
15585 (interp::interp, interp::~interp): New.
15586 (interp_set): Use bool, and return void. Assume the interpreter
15587 has suspend, init and resume methods, and that the all return
15589 (set_top_level_interpreter): interp_set returns void.
15590 (interp_ui_out): Adapt.
15591 (current_interp_set_logging): Adapt.
15592 (interp_data): Delete.
15593 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
15594 (interp_exec): Adapt.
15595 (top_level_interpreter_data): Delete.
15596 * interps.h (interp_init_ftype, interp_resume_ftype)
15597 (interp_suspend_ftype, interp_exec_ftype)
15598 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
15599 (class interp): New.
15600 (interp_new): Delete.
15601 (interp_set): Now returns void. Use bool.
15602 (interp_data, top_level_interpreter_data): Delete.
15603 * mi/mi-common.h: Include interps.h.
15604 (class mi_interp): Inherit from interp. Define a ctor. Declare
15605 init, resume, suspect, exec, interp_ui_out, set_logging and
15606 pre_command_loop methods.
15607 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
15608 (mi_interpreter_init): Rename to ...
15609 (mi_interp::init): ... this. Remove the 'interp' parameter, use
15610 bool, return void and make extern. Adjust.
15611 (mi_interpreter_resume): ... Rename to ...
15612 (mi_interp::resume): ... this. Remove the 'data' parameter,
15613 return void and make extern. Adjust.
15614 (mi_interpreter_suspend): ... Rename to ...
15615 (mi_interp::suspend): ... this. Remove the 'data' parameter,
15616 return void and make extern. Adjust.
15617 (mi_interpreter_exec): ... Rename to ...
15618 (mi_interp::exec): ... this. Remove the 'data' parameter and make
15620 (mi_interpreter_pre_command_loop): ... Rename to ...
15621 (mi_interp::pre_command_loop): ... this. Remove the 'self'
15622 parameter and make extern.
15623 (mi_on_normal_stop_1): Adjust.
15624 (mi_ui_out): Rename to ...
15625 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
15626 parameter and make extern. Adjust.
15627 (mi_set_logging): Rename to ...
15628 (mi_interp::set_logging): ... this. Remove the 'interp'
15629 parameter and make extern. Adjust.
15630 (mi_interp_procs): Delete.
15631 (mi_interp_factory): Adjust to use 'new'.
15632 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
15633 (mi_print_exception, mi_execute_command, mi_load_progress):
15635 * tui/tui-interp.c (tui_interp): New class.
15636 (as_tui_interp): Return a tui_interp pointer.
15637 (tui_on_normal_stop, tui_on_signal_received)
15638 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
15639 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
15640 to use interp::interp_ui_out.
15641 (tui_init): Rename to ...
15642 (tui_interp::init): ... this. Remove the 'self' parameter, use
15643 bool, return void and make extern. Adjust.
15644 (tui_resume): Rename to ...
15645 (tui_interp::resume): ... this. Remove the 'data' parameter,
15646 return void and make extern. Adjust.
15647 (tui_suspend): Rename to ...
15648 (tui_interp::suspend): ... this. Remove the 'data' parameter,
15649 return void and make extern. Adjust.
15650 (tui_ui_out): Rename to ...
15651 (tui_interp::interp_ui_out): ... this. Remove the 'self'
15652 parameter, and make extern. Adjust.
15653 (tui_exec): Rename to ...
15654 (tui_interp::exec): ... this. Remove the 'data' parameter and
15656 (tui_interp_procs): Delete.
15657 (tui_interp_factory): Use "new".
15659 2017-02-02 Tom Tromey <tom@tromey.com>
15661 * rust-exp.y (ends_raw_string, space_then_number)
15662 (rust_identifier_start_p): Return bool.
15663 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
15664 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
15665 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
15666 (rust_chartype_p): Return bool.
15667 (val_print_struct, rust_print_struct_def, rust_print_type):
15669 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
15672 2017-02-02 Tom Tromey <tom@tromey.com>
15674 * rust-lang.c: Reindent.
15676 2017-02-02 Tom Tromey <tom@tromey.com>
15678 * rust-lang.h (rust_crate_for_block): Update.
15679 * rust-lang.c (rust_crate_for_block): Return std::string.
15680 (rust_get_disr_info): Use std:;string, not
15681 gdb::unique_xmalloc_ptr.
15682 * rust-exp.y (crate_name): Update.
15684 2017-02-02 Pedro Alves <palves@redhat.com>
15686 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
15687 field out of gdb_disassembler_test and make it static.
15689 2017-02-02 Pedro Alves <palves@redhat.com>
15691 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
15692 mi1_interp and mi_interp fields.
15694 2017-02-02 Pedro Alves <palves@redhat.com>
15696 * cli/cli-interp.c (struct saved_output_files, saved_output):
15697 Moved from cli/cli-logging.c.
15698 (cli_set_logging): New function.
15699 (cli_interp_procs): Install cli_set_logging.
15700 * cli/cli-interp.h (make_logging_output, cli_set_logging):
15702 * cli/cli-logging.c (struct saved_output_files, saved_output):
15703 Moved to cli/cli-interp.c.
15704 (pop_output_files): Don't save outputs here.
15705 (make_logging_output): New function.
15706 (handle_redirections): Don't build tee nor save previous outputs
15708 * interps.c (current_interp_set_logging): Change prototype.
15709 Assume there's always a set_logging_proc method installed.
15710 * interps.h (interp_set_logging_ftype): Change prototype.
15711 (current_interp_set_logging): Change prototype and adjust comment.
15712 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
15713 use make_logging_output.
15714 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
15715 2017-02-02 Pedro Alves <palves@redhat.com>
15717 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
15719 (set_logging_overwrite): ... here.
15720 (logging_no_redirect_file): Delete.
15721 (set_logging_redirect): Don't handle redirection on the fly.
15722 Instead warn that "logging off" / "logging on" is necessary.
15723 (pop_output_files): Delete references to logging_no_redirect_file.
15724 (show_logging_command): Always speak in terms of what will happen
15725 once logging is reenabled.
15727 2017-02-02 Pedro Alves <palves@redhat.com>
15729 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
15731 2017-02-02 Pedro Alves <palves@redhat.com>
15733 * disasm.c (gdb_pretty_print_insn): Rename to ...
15734 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
15735 Remove gdbarch parameter. Adapt to clear the object's buffers
15736 instead of allocating new buffers, and to print using the object's
15737 gdb_disassembler instead of calling gdb_print_insn.
15738 (dump_insns): Use gdb_pretty_print_disassembler.
15739 * disasm.h (gdb_pretty_print_insn): Delete declaration.
15740 (gdb_pretty_print_disassembler): New class.
15741 * record-btrace.c (btrace_insn_history): Use
15742 gdb_pretty_print_disassembler.
15744 2017-02-02 Pedro Alves <palves@redhat.com>
15746 * ada-lang.c (type_as_string): Use string_file.
15747 * ada-valprint.c (ada_print_floating): Use string_file.
15748 * ada-varobj.c (ada_varobj_scalar_image)
15749 (ada_varobj_get_value_image): Use string_file.
15750 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
15751 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
15752 * breakpoint.c (update_inserted_breakpoint_locations)
15753 (insert_breakpoint_locations, reattach_breakpoints)
15754 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
15755 (print_it_watchpoint): Use string_file.
15756 (save_breakpoints): Use stdio_file.
15757 * c-exp.y (oper): Use string_file.
15758 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
15760 (pop_output_files): Use delete.
15761 (handle_redirections): Use stdio_file and tee_file.
15762 * cli/cli-setshow.c (do_show_command): Use string_file.
15763 * compile/compile-c-support.c (c_compute_program): Use
15765 * compile/compile-c-symbols.c (generate_vla_size): Take a
15766 'string_file &' instead of a 'ui_file *'.
15767 (generate_c_for_for_one_variable): Take a 'string_file &' instead
15768 of a 'ui_file *'. Use string_file.
15769 (generate_c_for_variable_locations): Take a 'string_file &'
15770 instead of a 'ui_file *'.
15771 * compile/compile-internal.h (generate_c_for_for_one_variable):
15772 Take a 'string_file &' instead of a 'ui_file *'.
15773 * compile/compile-loc2c.c (push, pushf, unary, binary)
15774 (print_label, pushf_register_address, pushf_register)
15775 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
15776 'ui_file *'. Adjust.
15777 * compile/compile.c (compile_to_object): Use string_file.
15778 * compile/compile.h (compile_dwarf_expr_to_c)
15779 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
15781 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
15782 (replace_typedefs_qualified_name): Use string_file and
15784 * disasm.c (gdb_pretty_print_insn): Use string_file.
15785 (gdb_disassembly): Adjust reference the null_stream global.
15786 (do_ui_file_delete): Delete.
15787 (gdb_insn_length): Use null_stream.
15788 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
15789 * dwarf2loc.c (dwarf2_compile_property_to_c)
15790 (locexpr_generate_c_location, loclist_generate_c_location): Take a
15791 'string_file &' instead of a 'ui_file *'.
15792 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
15793 * dwarf2read.c (do_ui_file_peek_last): Delete.
15794 (dwarf2_compute_name): Use string_file.
15795 * event-top.c (gdb_setup_readline): Use stdio_file.
15796 * gdbarch.sh (verify_gdbarch): Use string_file.
15797 * gdbtypes.c (safe_parse_type): Use null_stream.
15798 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
15800 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
15801 'string_file *' instead of a 'ui_file *'.
15802 (gdbscm_arch_disassemble): Use string_file.
15803 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
15804 * guile/scm-ports.c (class ioscm_file_port): Now a class that
15805 inherits from ui_file.
15806 (ioscm_file_port_delete, ioscm_file_port_rewind)
15807 (ioscm_file_port_put): Delete.
15808 (ioscm_file_port_write): Rename to ...
15809 (ioscm_file_port::write): ... this. Remove file_port_magic
15811 (ioscm_file_port_new): Delete.
15812 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
15814 * guile/scm-type.c (tyscm_type_name): Use string_file.
15815 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
15817 * infcmd.c (print_return_value_1): Use string_file.
15818 * infrun.c (print_target_wait_results): Use string_file.
15819 * language.c (add_language): Use string_file.
15820 * location.c (explicit_to_string_internal): Use string_file.
15821 * main.c (captured_main_1): Use null_file.
15822 * maint.c (maintenance_print_architecture): Use stdio_file.
15823 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
15824 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
15825 event_channel>: Change type to mi_console_file pointer.
15826 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
15827 (mi_console_file_delete): Delete.
15828 (struct mi_console_file): Delete.
15829 (mi_console_file_magic): Delete.
15830 (mi_console_file_new): Delete.
15831 (mi_console_file::mi_console_file): New.
15832 (mi_console_file_delete): Delete.
15833 (mi_console_file_fputs): Delete.
15834 (mi_console_file::write): New.
15835 (mi_console_raw_packet): Delete.
15836 (mi_console_file::flush): New.
15837 (mi_console_file_flush): Delete.
15838 (mi_console_set_raw): Rename to ...
15839 (mi_console_file::set_raw): ... this.
15840 * mi/mi-console.h (class mi_console_file): New class.
15841 (mi_console_file_new, mi_console_set_raw): Delete.
15842 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
15843 (mi_set_logging): Use delete and tee_file. Adjust.
15844 * mi/mi-main.c (output_register): Use string_file.
15845 (mi_cmd_data_evaluate_expression): Use string_file.
15846 (mi_cmd_data_read_memory): Use string_file.
15847 (mi_cmd_execute, print_variable_or_computed): Use string_file.
15848 * mi/mi-out.c (mi_ui_out::main_stream): New.
15849 (mi_ui_out::rewind): Use main_stream and
15851 (mi_ui_out::put): Use main_stream and string_file.
15852 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15853 Allocate a 'string_file' instead.
15854 (mi_out_new): Don't allocate a mem_fileopen stream here.
15855 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
15856 (mi_ui_out::main_stream): Declare method.
15857 * printcmd.c (eval_command): Use string_file.
15858 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
15859 * python/py-arch.c (archpy_disassemble): Use string_file.
15860 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
15861 * python/py-frame.c (frapy_str): Use string_file.
15862 * python/py-framefilter.c (py_print_type, py_print_single_arg):
15864 * python/py-type.c (typy_str): Use string_file.
15865 * python/py-unwind.c (unwind_infopy_str): Use string_file.
15866 * python/py-value.c (valpy_str): Use string_file.
15867 * record-btrace.c (btrace_insn_history): Use string_file.
15868 * regcache.c (regcache_print): Use stdio_file.
15869 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
15870 * remote.c (escape_buffer): Use string_file.
15871 * rust-lang.c (rust_get_disr_info): Use string_file.
15872 * serial.c (serial_open_ops_1): Use stdio_file.
15873 (do_serial_close): Use delete.
15874 * stack.c (print_frame_arg): Use string_file.
15875 (print_frame_args): Remove local mem_fileopen stream, not used.
15876 (print_frame): Use string_file.
15877 * symmisc.c (maintenance_print_symbols): Use stdio_file.
15878 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
15879 Take a 'string_file *' instead of a 'ui_file *'.
15880 * top.c (new_ui): Use stdio_file and stderr_file.
15881 (free_ui): Use delete.
15882 (execute_command_to_string): Use string_file.
15883 (quit_confirm): Use string_file.
15884 * tracepoint.c (collection_list::append_exp): Use string_file.
15885 * tui/tui-disasm.c (tui_disassemble): Use string_file.
15886 * tui/tui-file.c: Don't include "ui-file.h".
15887 (enum streamtype, struct tui_stream): Delete.
15888 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
15889 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
15890 (tui_file::tui_file): New method.
15891 (tui_file_fputs): Delete.
15892 (tui_file_get_strbuf): Delete.
15893 (tui_file::puts): New method.
15894 (tui_file_adjust_strbuf): Delete.
15895 (tui_file_flush): Delete.
15896 (tui_file::flush): New method.
15897 * tui/tui-file.h: Tweak intro comment.
15899 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
15900 (tui_file_adjust_strbuf): Delete declarations.
15901 (class tui_file): New class.
15902 * tui/tui-io.c (tui_initialize_io): Use tui_file.
15903 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
15904 (tui_register_format): Use string_stream.
15905 * tui/tui-stack.c (tui_make_status_line): Use string_file.
15906 (tui_get_function_from_frame): Use string_file.
15907 * typeprint.c (type_to_string): Use string_file.
15908 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
15909 (null_stream): New global.
15910 (ui_file_delete): Delete.
15911 (ui_file::ui_file): New.
15912 (null_file_isatty): Delete.
15913 (ui_file::~ui_file): New.
15914 (null_file_rewind): Delete.
15915 (ui_file::printf): New.
15916 (null_file_put): Delete.
15917 (null_file_flush): Delete.
15918 (ui_file::putstr): New.
15919 (null_file_write): Delete.
15920 (ui_file::putstrn): New.
15921 (null_file_read): Delete.
15922 (ui_file::putc): New.
15923 (null_file_fputs): Delete.
15924 (null_file_write_async_safe): Delete.
15925 (ui_file::vprintf): New.
15926 (null_file_delete): Delete.
15927 (null_file::write): New.
15928 (null_file_fseek): Delete.
15929 (null_file::puts): New.
15930 (ui_file_data): Delete.
15931 (null_file::write_async_safe): New.
15932 (gdb_flush, ui_file_isatty): Adjust.
15933 (ui_file_put, ui_file_rewind): Delete.
15934 (ui_file_write): Adjust.
15935 (ui_file_write_for_put): Delete.
15936 (ui_file_write_async_safe, ui_file_read): Adjust.
15937 (ui_file_fseek): Delete.
15938 (fputs_unfiltered): Adjust.
15939 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
15940 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
15941 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
15942 (set_ui_file_data): Delete.
15943 (string_file::~string_file, string_file::write)
15944 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
15945 (do_ui_file_as_string, ui_file_as_string): Delete.
15946 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
15947 (struct mem_file): Delete.
15948 (mem_file_new): Delete.
15949 (stdio_file::stdio_file): New.
15950 (mem_file_delete): Delete.
15951 (stdio_file::stdio_file): New.
15952 (mem_fileopen): Delete.
15953 (stdio_file::~stdio_file): New.
15954 (mem_file_rewind): Delete.
15955 (stdio_file::set_stream): New.
15956 (mem_file_put): Delete.
15957 (stdio_file::open): New.
15958 (mem_file_write): Delete.
15959 (stdio_file_magic, struct stdio_file): Delete.
15960 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
15961 (stdio_file::flush): New.
15962 (stdio_file_read): Rename to ...
15963 (stdio_file::read): ... this. Adjust.
15964 (stdio_file_write): Rename to ...
15965 (stdio_file::write): ... this. Adjust.
15966 (stdio_file_write_async_safe): Rename to ...
15967 (stdio_file::write_async_safe) ... this. Adjust.
15968 (stdio_file_fputs): Rename to ...
15969 (stdio_file::puts) ... this. Adjust.
15970 (stdio_file_isatty): Delete.
15971 (stdio_file_fseek): Delete.
15972 (stdio_file::isatty): New.
15973 (stderr_file_write): Rename to ...
15974 (stderr_file::write) ... this. Adjust.
15975 (stderr_file_fputs): Rename to ...
15976 (stderr_file::puts) ... this. Adjust.
15977 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
15978 (stderr_file::stderr_file): New.
15979 (tee_file_magic): Delete.
15980 (struct tee_file): Delete.
15981 (tee_file::tee_file): New.
15982 (tee_file_new): Delete.
15983 (tee_file::~tee_file): New.
15984 (tee_file_delete): Delete.
15985 (tee_file_flush): Rename to ...
15986 (tee_file::flush): ... this. Adjust.
15987 (tee_file_write): Rename to ...
15988 (tee_file::write): ... this. Adjust.
15989 (tee_file::write_async_safe): New.
15990 (tee_file_fputs): Rename to ...
15991 (tee_file::puts): ... this. Adjust.
15992 (tee_file_isatty): Rename to ...
15993 (tee_file::isatty): ... this. Adjust.
15994 * ui-file.h (struct obstack, struct ui_file): Don't
15996 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
15997 (ui_file_write_ftype)
15998 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
15999 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16000 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16001 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16002 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16003 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16004 (set_ui_file_fseek): Delete.
16005 (ui_file_data, ui_file_delete, ui_file_rewind)
16006 (struct ui_file): New.
16008 (class null_file): New.
16009 (null_stream): Declare.
16010 (ui_file_write_for_put, ui_file_put): Delete.
16011 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16013 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16014 (gdb_fopen, tee_file_new): Delete.
16015 (struct string_file): New.
16016 (struct stdio_file): New.
16017 (stdio_file_up): New.
16018 (struct stderr_file): New.
16019 (class tee_file): New.
16020 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16021 of a 'ui_file *'. Adjust.
16022 * ui-out.h (class ui_out) <field_stream>: Likewise.
16023 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16024 (null_stream): Delete.
16025 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16027 * utils.h (struct ui_file): Delete forward declaration..
16028 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16029 (error_stream): Take a 'string_file &' instead of a
16031 * varobj.c (varobj_value_get_print_value): Use string_file.
16032 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16033 * gdbarch.c: Regenerate.
16035 2017-02-02 Pedro Alves <palves@redhat.com>
16037 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16038 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16039 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16040 Adjust to call gdb_print_insn instead of
16041 gdb_disassembler::print_insn.
16042 (dump_insns, do_mixed_source_and_assembly_deprecated)
16043 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16044 'gdbarch' parameter. Remove gdb_disassembler parameter.
16045 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16046 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16048 (gdb_pretty_print_insn): Re-add declaration.
16049 * record-btrace.c (btrace_insn_history): Don't allocate a
16050 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16052 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16054 * disasm.h (gdb_disassembly): Remove file_string parameter.
16055 * disasm.c (gdb_disassembly): Likewise.
16056 * cli/cli-cmds.c (print_disassembly): Adapt.
16057 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16058 * stack.c (do_gdb_disassembly): Likewise.
16060 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16062 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16063 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16064 targets. And if the implicit value is longer than needed, extract
16065 the first bytes instead of the "least significant" ones.
16067 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16069 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16070 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16071 (btrace_fetch): Assert can_access_registers_ptid.
16072 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16073 validate_registers_access.
16075 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16077 * gdbthread.h (can_access_registers_ptid): New.
16078 * thread.c (can_access_registers_ptid): New.
16080 2017-02-01 Pedro Alves <palves@redhat.com>
16082 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16084 2017-01-31 Pedro Alves <palves@redhat.com>
16086 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16089 2017-01-31 Pedro Alves <palves@redhat.com>
16091 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16094 2017-01-31 Pedro Alves <palves@redhat.com>
16096 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16098 2017-01-31 Pedro Alves <palves@redhat.com>
16100 * common/scoped_restore.h
16101 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16102 change the value's parameter type to T2.
16103 (make_scoped_restore): Likewise.
16105 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16106 Richard Henderson <rth@redhat.com>
16108 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16109 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16110 GS_BASE for older kernels.
16111 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16112 GS_BASE for older kernels.
16113 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16114 and GS_BASE to the offset table.
16115 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16116 system register group.
16117 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16119 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16121 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16122 AMD64_GSBASE_REGNUM.
16123 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16124 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16125 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16126 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16127 i386/64bit-segments.xml in those rules.
16128 * features/i386/64bit-segments.xml: New file.
16129 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16130 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16131 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16132 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16133 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16134 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16135 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16136 * features/i386/amd64-avx-linux.c: Regenerated.
16137 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16138 * features/i386/amd64-avx-mpx.c: Regenerated.
16139 * features/i386/amd64-avx512-linux.c: Regenerated.
16140 * features/i386/amd64-linux.c: Regenerated.
16141 * features/i386/amd64-mpx-linux.c: Regenerated.
16142 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16143 * features/i386/i386-avx-mpx.c: Regenerated.
16144 * features/i386/x32-avx-linux.c: Regenerated.
16145 * features/i386/x32-avx512-linux.c: Regenerated.
16146 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16147 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16148 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16149 * regformats/i386/amd64-linux.dat: Regenerated.
16150 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16151 * regformats/i386/x32-avx-linux.dat: Regenerated.
16152 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16153 * regformats/i386/x32-linux.dat: Regenerated.
16155 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16157 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16158 Set to AMD64_NUM_REGS.
16160 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16162 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16163 that checks validity of a register number.
16165 2017-01-27 Kees Cook <keescook@google.com>
16167 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16168 fetch_fpregs if target has fpa registers.
16169 (arm_linux_store_inferior_registers): Call store_fpregs if target
16172 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16174 * cris-tdep.c (cris_gdbarch_init): Remove check for
16175 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16177 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16179 * corelow.c (get_core_register_section): Check for regset
16180 existence before checking for REGSET_VARIABLE_SIZE.
16182 2017-01-26 Yao Qi <yao.qi@linaro.org>
16183 Pedro Alves <palves@redhat.com>
16186 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16187 call memory_error, save memaddr instead.
16188 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16189 negative, cal memory_error.
16190 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16192 2017-01-26 Yao Qi <yao.qi@linaro.org>
16194 * disasm-selftests.c (memory_error_test): New function.
16195 (_initialize_disasm_selftests): Register memory_error_test.
16197 2017-01-26 Yao Qi <yao.qi@linaro.org>
16199 * Makefile.in (SFILES): Add disasm-selftests.c and
16201 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16202 * disasm-selftests.c: New file.
16203 * selftest-arch.c: New file.
16204 * selftest-arch.h: New file.
16206 2017-01-26 Yao Qi <yao.qi@linaro.org>
16208 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16209 to bfd_arch_mep. Don't return 0 if section is not
16210 found. Call print_insn_mep.
16212 2017-01-26 Pedro Alves <palves@redhat.com>
16213 Yao Qi <yao.qi@linaro.org>
16215 * arm-tdep.c: Include "disasm.h".
16216 (gdb_print_insn_arm): Update code to get gdbarch.
16217 * disasm.c (dis_asm_read_memory): Change it to
16218 gdb_disassembler::dis_asm_read_memory.
16219 (dis_asm_memory_error): Likewise.
16220 (dis_asm_print_address): Likewise.
16221 (gdb_pretty_print_insn): Change it to
16222 gdb_disassembler::pretty_print_insn.
16223 (dump_insns): Add one argument gdb_disassemlber. All
16225 (do_mixed_source_and_assembly_deprecated): Likewise.
16226 (do_mixed_source_and_assembly): Likewise.
16227 (do_assembly_only): Likewise.
16228 (gdb_disassembler::gdb_disassembler): New.
16229 (gdb_disassembler::print_insn): New.
16230 * disasm.h (class gdb_disassembler): New.
16231 (gdb_pretty_print_insn): Remove declaration.
16232 (gdb_disassemble_info): Likewise.
16233 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16234 (gdbscm_disasm_read_memory_worker): Update.
16235 (gdbscm_disasm_read_memory): Update.
16236 (gdbscm_disasm_memory_error): Remove.
16237 (gdbscm_disasm_print_address): Remove.
16238 (gdbscm_disassembler::gdbscm_disassembler): New.
16239 (gdbscm_print_insn_from_port): Update.
16240 * mips-tdep.c: Include disasm.h.
16241 (gdb_print_insn_mips): Update code to get gdbarch.
16242 * record-btrace.c (btrace_insn_history): Update.
16243 * spu-tdep.c: Include disasm.h.
16244 (struct spu_dis_asm_data): Remove.
16245 (struct spu_dis_asm_info): New.
16246 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16248 (gdb_print_insn_spu): Cast disassemble_info to
16251 2017-01-26 Yao Qi <yao.qi@linaro.org>
16253 * disasm.c (do_ui_file_delete): Delete.
16254 (gdb_insn_length): Move code creating stream to ...
16255 * utils.c (null_stream): ... here. New function.
16256 * utils.h (null_stream): Declare.
16258 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16260 * python/py-inferior.c (find_thread_object): Return directly
16261 from the loop. Remove "found" variable.
16263 2017-01-21 Joel Brobecker <brobecker@adacore.com>
16265 GDB 7.12.1 released.
16267 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16269 * python/py-function.c (fnpy_call): Reorder declarations to have
16270 the gdbpy_enter object declared first.
16271 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16273 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16276 * python/python-internal.h (PyMem_RawMalloc): Define for
16278 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16279 PyMem_RawMalloc instead of PyMem_Malloc.
16281 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16282 Luis Machado <lgustavo@codesourcery.com>
16284 * NEWS (New commands): Mention flash-erase.
16285 (New MI commands): Mention target-flash-erase.
16286 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16288 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16289 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16290 * target.c (flash_erase_command): New function.
16291 (initialize_targets): Add new flash-erase command.
16292 * target.h (flash_erase_command): New declaration.
16294 2017-01-20 Joel Brobecker <brobecker@adacore.com>
16296 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16297 HAVE_SYS_PROCFS_H is defined.
16299 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16301 * remote.c (struct cached_reg): Change data into a pointer.
16302 * (stop_reply_dtr): Free data pointers before deleting vector.
16303 (process_stop_reply): Likewise.
16304 (remote_parse_stop_reply): Allocate space for data
16306 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16308 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16310 (amd64_pseudo_register_read_value): Likewise.
16311 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16312 (store_register_using_P): Likewise.
16313 * regcache.c (regcache_xfer_part): Likewise.
16315 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16317 Split real and pseudo registers.
16318 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16319 (sparc32_pseudo_regnum): New enum.
16320 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16321 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16322 (SPARC32_CP0_REGISTERS): New macro.
16323 (sparc32_pseudo_register_name): New function.
16324 (sparc32_register_name): Use sparc32_pseudo_register_name.
16325 (sparc32_pseudo_register_type): New function.
16326 (sparc32_register_type): Use sparc32_pseudo_register_type.
16327 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16328 pseudo register numbers.
16329 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16330 (SPARC64_CP0_REGISTERS): New macro.
16331 (sparc64_pseudo_register_name): New function.
16332 (sparc64_register_name): Use sparc64_pseudo_register_name.
16333 (sparc64_pseudo_register_type): New function.
16334 (sparc64_register_type): Use sparc64_pseudo_register_type.
16335 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16336 pseudo register numbers.
16337 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16338 sparc64_store_arguments): Handle pseudo register numbers.
16340 2017-01-13 Yao Qi <yao.qi@linaro.org>
16342 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16343 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16345 (getpkt_or_notif_sane_1): Likewise.
16347 2017-01-13 Yao Qi <yao.qi@linaro.org>
16349 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16350 of CC. Pass "-x c++-header" instead of "-x c".
16352 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16354 * remote.c (remote_can_async_p): Update comment.
16356 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16358 * linux-nat.c (linux_nat_can_async_p): Update comment.
16360 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16362 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16364 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16366 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16368 2017-01-10 Tom Tromey <tom@tromey.com>
16370 * python/py-type.c (typy_legacy_template_argument): Update.
16371 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16372 ~demangle_parse_info): Declare new members.
16373 (cp_demangled_name_to_comp): Return unique_ptr.
16374 (cp_demangled_name_parse_free)
16375 (make_cleanup_cp_demangled_name_parse_free)
16376 (cp_new_demangle_parse_info): Remove.
16377 * cp-support.c (do_demangled_name_parse_free_cleanup)
16378 (make_cleanup_cp_demangled_name_parse_free): Remove.
16379 (inspect_type, cp_canonicalize_string_full)
16380 (cp_canonicalize_string): Update.
16381 (mangled_name_to_comp): Change return type.
16382 (cp_class_name_from_physname, method_name_from_physname)
16383 (cp_func_name, cp_remove_params): Update.
16384 * cp-name-parser.y (demangle_parse_info): New constructor, from
16385 cp_new_demangle_parse_info.
16386 (~demangle_parse_info): New destructor, from
16387 cp_demangled_name_parse_free.
16388 (cp_merge_demangle_parse_infos): Update.
16389 (cp_demangled_name_to_comp): Change return type.
16391 2017-01-10 Tom Tromey <tom@tromey.com>
16393 * top.c (prevent_dont_repeat): Change return type.
16394 * python/python.c (execute_gdb_command): Use std::string.
16396 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16397 * command.h (prevent_dont_repeat): Change return type.
16398 * breakpoint.c (bpstat_do_actions_1): Update.
16400 2017-01-10 Tom Tromey <tom@tromey.com>
16402 * value.h (scoped_value_mark::~scoped_value_mark): Call
16404 (scoped_value_mark::free_to_mark): New method.
16405 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
16408 2017-01-10 Tom Tromey <tom@tromey.com>
16410 * python/py-value.c (valpy_dereference, valpy_referenced_value)
16411 (valpy_reference_value, valpy_const_value, valpy_get_address)
16412 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
16413 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
16414 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
16415 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
16417 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
16418 * value.h (scoped_value_mark): New class.
16420 2017-01-10 Tom Tromey <tom@tromey.com>
16422 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
16423 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
16424 * psymtab.c (discard_psymtabs_upto): Remove.
16425 (make_cleanup_discard_psymtabs): Remove.
16426 (struct psymtab_state): Remove.
16428 2017-01-10 Tom Tromey <tom@tromey.com>
16430 * record-full.c (record_full_save_cleanups): Remove.
16431 (record_full_save): Use gdb::unlinker.
16432 * gcore.c (do_bfd_delete_cleanup): Remove.
16433 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
16435 * dwarf2read.c (unlink_if_set): Remove.
16436 (write_psymtabs_to_index): Use gdb::unlinker.
16437 * common/gdb_unlinker.h: New file.
16439 2017-01-10 Tom Tromey <tom@tromey.com>
16441 * windows-tdep.c (windows_xfer_shared_library): Update.
16442 * windows-nat.c (windows_make_so): Update.
16443 * utils.h (make_cleanup_bfd_unref): Remove.
16444 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
16445 * symfile.h (symfile_bfd_open)
16446 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
16447 * symfile.c (read_symbols, symbol_file_add)
16448 (separate_debug_file_exists): Update.
16449 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
16450 (generic_load, reread_symbols): Update.
16451 * symfile-mem.c (symbol_file_add_from_memory): Update.
16452 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
16453 (spu_symbol_file_add_from_memory): Update.
16454 * solist.h (struct target_so_ops) <bfd_open>: Return
16456 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
16457 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
16459 (solib_map_sections, reload_shared_libraries_1): Update.
16460 * solib-svr4.c (enable_break): Update.
16461 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
16462 * solib-frv.c (enable_break2): Update.
16463 * solib-dsbt.c (enable_break): Update.
16464 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
16466 (darwin_solib_get_all_image_info_addr_at_init): Update.
16467 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
16468 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
16469 * record-full.c (record_full_save): Update.
16470 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
16471 * procfs.c (insert_dbx_link_bpt_in_file): Update.
16472 * minidebug.c (find_separate_debug_file_in_section): Return
16474 * machoread.c (macho_add_oso_symfile): Change abfd to
16476 (macho_symfile_read_all_oso): Update.
16477 (macho_check_dsym): Return gdb_bfd_ref_ptr.
16478 (macho_symfile_read): Update.
16479 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
16480 (jit_bfd_try_read_symtab): Update.
16481 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16482 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16483 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16485 (gdb_bfd_ref_policy): New struct.
16486 (gdb_bfd_ref_ptr): New typedef.
16487 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
16488 (gdb_bfd_openw, gdb_bfd_openr_iovec)
16489 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
16491 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16492 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
16493 (gcore_command): Update.
16494 * exec.c (exec_file_attach): Update.
16495 * elfread.c (elf_symfile_read): Update.
16496 * dwarf2read.c (dwarf2_get_dwz_file): Update.
16497 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
16498 (open_and_init_dwo_file): Update.
16499 (open_dwp_file): Return gdb_bfd_ref_ptr.
16500 (open_and_init_dwp_file): Update.
16501 * corelow.c (core_open): Update.
16502 * compile/compile-object-load.c (compile_object_load): Update.
16503 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
16504 * coffread.c (coff_symfile_read): Update.
16505 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
16506 gdb_bfd_ref_ptr. Rename.
16507 (dump_bfd_file, restore_command): Update.
16508 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16509 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
16510 (find_separate_debug_file_by_buildid): Update.
16512 2017-01-10 Tom Tromey <tom@tromey.com>
16514 * common/gdb_ref_ptr.h: New file.
16515 * python/py-ref.h (struct gdbpy_ref_policy): New.
16516 (gdbpy_ref): Now a typedef.
16518 2017-01-10 Tom Tromey <tom@tromey.com>
16520 * utils.h (make_cleanup_htab_delete): Don't declare.
16521 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
16523 * linespec.c (decode_compound_collector): Add constructor,
16525 (lookup_prefix_sym): Remove cleanup.
16526 (symtab_collector): Add constructor, destructor.
16527 (collect_symtabs_from_filename): Remove cleanup.
16528 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
16529 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
16531 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
16532 * dwarf2read.c (dw2_expand_symtabs_matching)
16533 (dw2_map_symbol_filenames, dwarf_decode_macros)
16534 (write_psymtabs_to_index): Use htab_up.
16535 * dwarf2loc.c (func_verify_no_selftailcall)
16536 (call_site_find_chain_1, func_verify_no_selftailcall)
16537 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
16538 std::vector, gdb::unique_xmalloc_ptr.
16539 (call_sitep): Remove typedef.
16540 (dwarf2_locexpr_baton_eval): Remove unused variable.
16542 2017-01-10 Tom Tromey <tom@tromey.com>
16544 * python/python-internal.h (make_cleanup_py_decref)
16545 (make_cleanup_py_xdecref): Don't declare.
16546 * python/py-utils.c (py_decref, make_cleanup_py_decref)
16547 (py_xdecref, make_cleanup_py_xdecref): Remove.
16549 2017-01-10 Tom Tromey <tom@tromey.com>
16551 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
16552 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
16554 2017-01-10 Tom Tromey <tom@tromey.com>
16556 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
16558 2017-01-10 Tom Tromey <tom@tromey.com>
16560 * python/py-utils.c (unicode_to_encoded_string)
16561 (python_string_to_target_string)
16562 (python_string_to_target_python_string)
16563 (python_string_to_host_string, gdbpy_obj_to_string)
16564 (get_addr_from_python): Use gdbpy_ref.
16566 2017-01-10 Tom Tromey <tom@tromey.com>
16568 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
16571 2017-01-10 Tom Tromey <tom@tromey.com>
16573 * python/python.c (eval_python_command, gdbpy_decode_line)
16574 (gdbpy_run_events, gdbpy_start_type_printers)
16575 (gdbpy_apply_type_printers): Use gdbpy_ref.
16577 2017-01-10 Tom Tromey <tom@tromey.com>
16579 * python/py-param.c (get_doc_string, compute_enum_values): Use
16582 2017-01-10 Tom Tromey <tom@tromey.com>
16584 * python/py-inferior.c (find_thread_object, build_inferior_list):
16587 2017-01-10 Tom Tromey <tom@tromey.com>
16589 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16591 2017-01-10 Tom Tromey <tom@tromey.com>
16593 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
16596 2017-01-10 Tom Tromey <tom@tromey.com>
16598 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
16600 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
16603 2017-01-10 Tom Tromey <tom@tromey.com>
16605 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16608 2017-01-10 Tom Tromey <tom@tromey.com>
16610 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
16611 decref results of PyArg_ParseTupleAndKeywords.
16613 2017-01-10 Tom Tromey <tom@tromey.com>
16615 * python/python.c (python_run_simple_file): Use
16616 unique_xmalloc_ptr, gdbpy_ref.
16618 2017-01-10 Tom Tromey <tom@tromey.com>
16620 * python/py-prettyprint.c (print_stack_unless_memory_error)
16621 (print_string_repr, print_children): Use gdbpy_ref.
16622 (dummy_python_frame): New class.
16623 (dummy_python_frame::dummy_python_frame): Rename from
16624 push_dummy_python_frame.
16625 (py_restore_tstate): Remove.
16627 2017-01-10 Tom Tromey <tom@tromey.com>
16629 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
16631 2017-01-10 Tom Tromey <tom@tromey.com>
16633 * python/python.c (ensure_python_env, restore_python_env):
16635 * python/python-internal.h (ensure_python_env): Don't declare.
16636 * varobj.h (varobj_ensure_python_env): Don't declare.
16637 * varobj.c (varobj_ensure_python_env): Remove.
16639 2017-01-10 Tom Tromey <tom@tromey.com>
16641 * varobj.c (varobj_value_get_print_value): Use
16642 gdbpy_enter_varobj.
16644 2017-01-10 Tom Tromey <tom@tromey.com>
16646 * python/py-prettyprint.c (print_string_repr, print_children):
16648 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
16650 * varobj.c (varobj_value_get_print_value): Update.
16651 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
16653 2017-01-10 Tom Tromey <tom@tromey.com>
16655 * varobj.c (varobj_get_display_hint)
16656 (dynamic_varobj_has_child_method, install_new_value_visualizer)
16657 (varobj_set_visualizer, free_variable): Use
16658 gdbpy_enter_varobj.
16660 2017-01-10 Tom Tromey <tom@tromey.com>
16662 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
16663 (do_finish_initialization): New function. Use gdbpy_ref.
16664 (gdbpy_finish_initialization): Use gdbpy_enter. Call
16665 do_finish_initialization.
16667 2017-01-10 Tom Tromey <tom@tromey.com>
16669 * python/py-param.c (get_set_value, get_show_value): Use
16670 gdbpy_enter, gdbpy_ref.
16672 2017-01-10 Tom Tromey <tom@tromey.com>
16674 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
16676 2017-01-10 Tom Tromey <tom@tromey.com>
16678 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
16680 2017-01-10 Tom Tromey <tom@tromey.com>
16682 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
16683 Use gdbpy_enter_varobj.
16685 2017-01-10 Tom Tromey <tom@tromey.com>
16687 * varobj.c (gdbpy_enter_varobj): New constructor.
16688 * python/python-internal.h (gdbpy_enter_varobj): New class.
16689 * python/py-varobj.c (py_varobj_get_iterator): Use
16690 gdbpy_enter_varobj.
16692 2017-01-10 Tom Tromey <tom@tromey.com>
16694 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
16695 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16696 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
16697 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
16698 unique_xmalloc_ptr.
16699 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
16701 2017-01-10 Tom Tromey <tom@tromey.com>
16703 * python/py-xmethods.c (invoke_match_method): Use
16706 2017-01-10 Tom Tromey <tom@tromey.com>
16708 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
16709 gdbpy_enter, gdbpy_ref.
16711 2017-01-10 Tom Tromey <tom@tromey.com>
16713 * python/python.c (python_interactive_command): Use gdbpy_enter.
16715 2017-01-10 Tom Tromey <tom@tromey.com>
16717 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
16720 2017-01-10 Tom Tromey <tom@tromey.com>
16722 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
16723 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
16725 2017-01-10 Tom Tromey <tom@tromey.com>
16727 * utils.h (htab_deleter): New struct.
16728 (htab_up): New typedef.
16729 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
16730 gdbpy_enter, gdbpy_ref, htab_up.
16732 2017-01-10 Tom Tromey <tom@tromey.com>
16734 * python/py-unwind.c (pending_frame_invalidate): Remove.
16735 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
16737 2017-01-10 Tom Tromey <tom@tromey.com>
16739 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
16740 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
16742 2017-01-10 Tom Tromey <tom@tromey.com>
16744 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
16746 2017-01-10 Tom Tromey <tom@tromey.com>
16748 * python/python.c (gdbpy_eval_from_control_command)
16749 (gdbpy_source_script, gdbpy_run_events)
16750 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
16751 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
16754 2017-01-10 Tom Tromey <tom@tromey.com>
16756 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
16758 2017-01-10 Tom Tromey <tom@tromey.com>
16760 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
16762 2017-01-10 Tom Tromey <tom@tromey.com>
16764 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
16765 (python_on_inferior_call_pre, python_on_inferior_call_post)
16766 (python_on_memory_change, python_on_register_change)
16767 (python_inferior_exit, python_new_objfile, add_thread_object)
16768 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
16770 2017-01-10 Tom Tromey <tom@tromey.com>
16772 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
16773 (bpfinishpy_handle_exit): Use gdbpy_enter.
16775 2017-01-10 Tom Tromey <tom@tromey.com>
16777 * python/py-cmd.c (cmdpy_destroyer)
16778 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
16781 2017-01-10 Tom Tromey <tom@tromey.com>
16783 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
16785 (gdbpy_breakpoint_has_cond): Likewise.
16787 2017-01-10 Tom Tromey <tom@tromey.com>
16789 * python/python.c (gdbpy_enter): New constructor.
16790 (~gdbpy_enter): New destructor.
16791 (restore_python_env, ensure_python_env): Rewrite.
16792 * python/python-internal.h (gdbpy_enter): New class.
16794 2017-01-10 Tom Tromey <tom@tromey.com>
16796 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
16798 2017-01-10 Tom Tromey <tom@tromey.com>
16800 * python/py-value.c (value_has_field, get_field_flag)
16801 (get_field_type, valpy_getitem, convert_value_from_python): Use
16804 2017-01-10 Tom Tromey <tom@tromey.com>
16806 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
16809 2017-01-10 Tom Tromey <tom@tromey.com>
16811 * python/py-prettyprint.c (search_pp_list)
16812 (find_pretty_printer_from_objfiles)
16813 (find_pretty_printer_from_progspace)
16814 (find_pretty_printer_from_gdb, find_pretty_printer)
16815 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
16818 2017-01-10 Tom Tromey <tom@tromey.com>
16820 * python/py-param.c (call_doc_function): Use gdbpy_ref.
16822 2017-01-10 Tom Tromey <tom@tromey.com>
16824 * python/py-linetable.c (build_line_table_tuple_from_pcs)
16825 (ltpy_get_all_source_lines): Use gdbpy_ref.
16827 2017-01-10 Tom Tromey <tom@tromey.com>
16829 * python/py-framefilter.c (extract_sym, extract_value)
16830 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
16833 2017-01-10 Tom Tromey <tom@tromey.com>
16835 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
16837 2017-01-10 Tom Tromey <tom@tromey.com>
16839 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
16841 2017-01-10 Tom Tromey <tom@tromey.com>
16843 * python/py-function.c (convert_values_to_python, fnpy_init): Use
16846 2017-01-10 Tom Tromey <tom@tromey.com>
16848 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
16850 2017-01-10 Tom Tromey <tom@tromey.com>
16852 * python/py-type.c (convert_field, make_fielditem, typy_fields)
16853 (typy_range): Use gdbpy_ref.
16855 2017-01-10 Tom Tromey <tom@tromey.com>
16857 * python/py-threadevent.c (create_thread_event_object): Use
16859 * python/py-stopevent.c (create_stop_event_object): Simplify.
16860 (emit_stop_event): Use gdbpy_ref.
16861 * python/py-signalevent.c (create_signal_event_object): Use
16863 * python/py-newobjfileevent.c (create_new_objfile_event_object)
16864 (emit_new_objfile_event, create_clear_objfiles_event_object)
16865 (emit_clear_objfiles_event): Use gdbpy_ref.
16866 * python/py-infevents.c (create_inferior_call_event_object)
16867 (create_register_changed_event_object)
16868 (create_memory_changed_event_object, emit_inferior_call_event)
16869 (emit_memory_changed_event, emit_register_changed_event): Use
16871 * python/py-exitedevent.c (create_exited_event_object)
16872 (emit_exited_event): Use gdbpy_ref.
16873 * python/py-event.h (evpy_emit_event): Remove
16874 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
16875 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
16876 * python/py-continueevent.c (emit_continue_event): Use
16878 * python/py-breakpoint.c (gdbpy_breakpoint_created)
16879 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
16881 * python/py-bpevent.c (create_breakpoint_event_object): Use
16884 2017-01-10 Tom Tromey <tom@tromey.com>
16886 * python/py-ref.h: New file.
16888 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16890 * cli-out.c (cli_ui_out::do_redirect): Change return type to
16892 * cli-out.h (cli_ui_out::do_redirect): Likewise.
16893 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
16894 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
16895 * ui-out.c (ui_out::redirect): Likewise.
16896 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
16897 * cli/cli-logging.c (set_logging_redirect): Update call site of
16899 (handle_redirections): Likewise.
16900 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
16901 * top.c (execute_command_to_string): Likewise.
16902 * utils.c (do_ui_out_redirect_pop): Likewise.
16904 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
16906 * stack.c (_initialize_stack): Update "frame" command help message.
16908 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
16910 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
16912 2017-01-06 Yao Qi <yao.qi@linaro.org>
16914 * x86-linux-nat.h: Include gdb_proc_service.h.
16916 2017-01-06 Yao Qi <yao.qi@linaro.org>
16918 * ser-base.h: Include serial.h.
16920 2017-01-06 Yao Qi <yao.qi@linaro.org>
16922 * ppc-linux-tdep.h: Include ppc-tdep.h.
16924 2017-01-06 Yao Qi <yao.qi@linaro.org>
16926 * nat/amd64-linux-siginfo.h: Include signal.h.
16928 2017-01-06 Yao Qi <yao.qi@linaro.org>
16930 * nat/aarch64-linux-hw-point.h: Include break-common.h.
16932 2017-01-06 Yao Qi <yao.qi@linaro.org>
16934 * mi/mi-parse.h: Include mi-cmds.h.
16936 2017-01-06 Yao Qi <yao.qi@linaro.org>
16938 * inf-loop.c: Don't include "target.h".
16939 * inf-loop.h: Include it here.
16941 2017-01-06 Yao Qi <yao.qi@linaro.org>
16943 * dfp.h: Include "dboulest.h" and "expression.h".
16945 2017-01-06 Yao Qi <yao.qi@linaro.org>
16947 * ax-gdb.h: Include "ax.h".
16949 2017-01-06 Yao Qi <yao.qi@linaro.org>
16951 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
16952 with nat/gdb_ptrace.h.
16954 2017-01-05 Yao Qi <yao.qi@linaro.org>
16956 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
16958 (mips64_fbsd_sigframe_init): Likewise.
16960 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16962 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
16963 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
16965 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16967 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
16968 * NEWS: Mention new FreeBSD/mips native configuration.
16969 * config/mips/fbsd.mh: New file.
16970 * configure.host: Add mips*-*-freebsd*.
16971 * mips-fbsd-nat.c: New file.
16973 2017-01-04 John Baldwin <jhb@FreeBSD.org>
16975 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
16976 (ALLDEPFILES): Add mips-fbsd-tdep.c.
16977 * NEWS: Mention new FreeBSD/mips target.
16978 * configure.tgt: Add mips*-*-freebsd*.
16979 * mips-fbsd-tdep.c: New file.
16980 * mips-fbsd-tdep.h: New file.
16982 2017-01-04 Yao Qi <yao.qi@linaro.org>
16984 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
16985 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
16987 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16989 Update copyright year range in all GDB files.
16991 2017-01-01 Joel Brobecker <brobecker@adacore.com>
16993 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
16995 For older changes see ChangeLog-2016.
17001 version-control: never