public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Remove some unused functions from guile code Date: Thu, 28 Jul 2022 20:44:11 +0000 (GMT) [thread overview] Message-ID: <20220728204411.BF30B3857C45@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8f83e7b9262e08fa43ca6e645337511c68ddc52a commit 8f83e7b9262e08fa43ca6e645337511c68ddc52a Author: Tom Tromey <tom@tromey.com> Date: Tue May 24 16:55:04 2022 -0600 Remove some unused functions from guile code The guile code has a couple of unused functions that touch on the registry API. This patch removes them. Diff: --- gdb/guile/guile-internal.h | 8 -------- gdb/guile/scm-gsmob.c | 36 ------------------------------------ 2 files changed, 44 deletions(-) diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h index 28e4889bfa9..4cdb7e355d7 100644 --- a/gdb/guile/guile-internal.h +++ b/gdb/guile/guile-internal.h @@ -287,14 +287,6 @@ extern void gdbscm_init_chained_gsmob (chained_gdb_smob *base); extern void gdbscm_init_eqable_gsmob (eqable_gdb_smob *base, SCM containing_scm); -extern void gdbscm_add_objfile_ref (struct objfile *objfile, - const struct objfile_data *data_key, - chained_gdb_smob *g_smob); - -extern void gdbscm_remove_objfile_ref (struct objfile *objfile, - const struct objfile_data *data_key, - chained_gdb_smob *g_smob); - extern htab_t gdbscm_create_eqable_gsmob_ptr_map (htab_hash hash_fn, htab_eq eq_fn); diff --git a/gdb/guile/scm-gsmob.c b/gdb/guile/scm-gsmob.c index 5096f1c475a..71fb263efdd 100644 --- a/gdb/guile/scm-gsmob.c +++ b/gdb/guile/scm-gsmob.c @@ -206,42 +206,6 @@ gdbscm_gsmob_kind (SCM self) smobs with references to them. There are several smobs that reference objfile-based data, so we provide helpers to manage this. */ -/* Add G_SMOB to the reference chain for OBJFILE specified by DATA_KEY. - OBJFILE may be NULL, in which case just set prev,next to NULL. */ - -void -gdbscm_add_objfile_ref (struct objfile *objfile, - const struct objfile_data *data_key, - chained_gdb_smob *g_smob) -{ - g_smob->prev = NULL; - if (objfile != NULL) - { - g_smob->next = (chained_gdb_smob *) objfile_data (objfile, data_key); - if (g_smob->next) - g_smob->next->prev = g_smob; - set_objfile_data (objfile, data_key, g_smob); - } - else - g_smob->next = NULL; -} - -/* Remove G_SMOB from the reference chain for OBJFILE specified - by DATA_KEY. OBJFILE may be NULL. */ - -void -gdbscm_remove_objfile_ref (struct objfile *objfile, - const struct objfile_data *data_key, - chained_gdb_smob *g_smob) -{ - if (g_smob->prev) - g_smob->prev->next = g_smob->next; - else if (objfile != NULL) - set_objfile_data (objfile, data_key, g_smob->next); - if (g_smob->next) - g_smob->next->prev = g_smob->prev; -} - /* Create a hash table for mapping a pointer to a gdb data structure to the gsmob that wraps it. */
reply other threads:[~2022-07-28 20:44 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220728204411.BF30B3857C45@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@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).