public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] Introduce a gdb_ref_ptr specialization for struct value Date: Fri, 06 Apr 2018 22:03:00 -0000 [thread overview] Message-ID: <22bc8444e6d377fd016253926c2a2597ff944842@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 22bc8444e6d377fd016253926c2a2597ff944842 *** Author: Tom Tromey <tom@tromey.com> Branch: master Commit: 22bc8444e6d377fd016253926c2a2597ff944842 Introduce a gdb_ref_ptr specialization for struct value struct value is internally reference counted and so, while it also has some ownership rules unique to it, it makes sense to use a gdb_ref_ptr when managing it automatically. This patch removes the existing unique_ptr specialization in favor of a reference-counted pointer. It also introduces two other clarifications: 1. Rename value_free to value_decref, which I think is more in line with what the function actually does; and 2. Change release_value to return a gdb_ref_ptr. This change allows us to remove the confusing release_value_or_incref function, primarily by making it much simpler to reason about the result of release_value. gdb/ChangeLog 2018-04-06 Tom Tromey <tom@tromey.com> * varobj.c (varobj_clear_saved_item) (update_dynamic_varobj_children, install_new_value, ~varobj): Update. * value.h (value_incref): Move declaration earlier. (value_decref): Rename from value_free. (struct value_ref_policy): New. (value_ref_ptr): New typedef. (struct value_deleter): Remove. (gdb_value_up): Remove typedef. (release_value): Change return type. (release_value_or_incref): Remove. * value.c (set_value_parent): Update. (value_incref): Change return type. (value_decref): Rename from value_free. (value_free_to_mark, free_all_values, free_value_chain): Update. (release_value): Return value_ref_ptr. (release_value_or_incref): Remove. (record_latest_value, set_internalvar, clear_internalvar): Update. * stack.c (info_frame_command): Don't call value_free. * python/py-value.c (valpy_dealloc, valpy_new) (value_to_value_object): Update. * printcmd.c (do_examine): Update. * opencl-lang.c (lval_func_free_closure): Update. * mi/mi-main.c (register_changed_p): Don't call value_free. * mep-tdep.c (mep_frame_prev_register): Don't call value_free. * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free. * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call value_free. * guile/scm-value.c (vlscm_free_value_smob) (vlscm_scm_from_value): Update. * frame.c (frame_register_unwind, frame_unwind_register_signed) (frame_unwind_register_unsigned, get_frame_register_bytes) (put_frame_register_bytes): Don't call value_free. * findvar.c (address_from_register): Don't call value_free. * dwarf2read.c (dwarf2_compute_name): Don't call value_free. * dwarf2loc.c (entry_data_value_free_closure) (value_of_dwarf_reg_entry, free_pieced_value_closure) (dwarf2_evaluate_loc_desc_full): Update. * breakpoint.c (update_watchpoint, breakpoint_init_inferior) (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check) (~watchpoint, watch_command_1) (invalidate_bp_value_on_memory_change): Update. * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
next reply other threads:[~2018-04-06 22:03 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-06 22:03 sergiodj+buildbot [this message] 2018-04-06 22:03 ` Failures on Debian-s390x-m64, branch master sergiodj+buildbot 2018-04-06 22:03 ` Failures on RHEL-s390x-m64, " sergiodj+buildbot 2018-04-06 22:07 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot 2018-04-06 22:07 ` Failures on Fedora-i686, " sergiodj+buildbot 2018-04-06 22:20 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot 2018-04-06 22:20 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot 2018-04-06 22:24 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot 2018-04-06 22:35 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot 2018-04-06 22:39 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE *** sergiodj+buildbot 2018-04-06 22:47 ` Failures on Ubuntu-AArch32-native-gdbserver-m32, branch master sergiodj+buildbot 2018-04-06 22:50 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot 2018-04-06 22:51 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot 2018-04-06 22:53 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=22bc8444e6d377fd016253926c2a2597ff944842@gdb-build \ --to=sergiodj+buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).