Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 3/6] Remove some unused functions from guile code
Date: Mon, 30 May 2022 11:59:31 -0600	[thread overview]
Message-ID: <20220530175934.3872892-4-tom@tromey.com> (raw)
In-Reply-To: <20220530175934.3872892-1-tom@tromey.com>

The guile code has a couple of unused functions that touch on the
registry API.  This patch removes them.
---
 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.  */
 
-- 
2.34.1


  parent reply	other threads:[~2022-05-30 18:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 17:59 [PATCH 0/6] Rewrite registry.h Tom Tromey
2022-05-30 17:59 ` [PATCH 1/6] Change address_space to use new and delete Tom Tromey
2022-05-30 17:59 ` [PATCH 2/6] Change allocation of type-copying hash table Tom Tromey
2022-05-30 17:59 ` Tom Tromey [this message]
2022-05-30 17:59 ` [PATCH 4/6] Rewrite registry.h Tom Tromey
2022-06-07 10:55   ` Lancelot SIX via Gdb-patches
2022-06-08  1:33     ` Tom Tromey
2022-06-08 18:51       ` Tom Tromey
2022-05-30 17:59 ` [PATCH 5/6] Change registry to use less memory Tom Tromey
2022-05-30 17:59 ` [PATCH 6/6] Remove some unneeded checks in Guile code Tom Tromey
2022-07-28 20:13 ` [PATCH 0/6] Rewrite registry.h Tom Tromey
2022-07-29  2:33   ` Simon Marchi via Gdb-patches
2022-08-02  2:46     ` Tom Tromey

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=20220530175934.3872892-4-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@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: link
Be 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