* [pushed] gdb: remove method_name_from_physname
@ 2026-10-14 19:59 Simon Marchi
0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2026-10-14 19:59 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
method_name_from_physname has been unused since commit eaea19f98d87
("gdb: Fully remove stabs code from GDB", 2025-02-12). Remove it.
Change-Id: I279673f6bbe9c0a76b46705dc64774a43b070987
---
gdb/cp-support.c | 26 --------------------------
gdb/cp-support.h | 2 --
2 files changed, 28 deletions(-)
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 3881d4b4cdeb..7a1b07a3b161 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -858,32 +858,6 @@ unqualified_name_from_comp (struct demangle_component *comp)
return ret_comp;
}
-/* Return the name of the method whose linkage name is PHYSNAME. */
-
-char *
-method_name_from_physname (const char *physname)
-{
- void *storage = NULL;
- gdb::unique_xmalloc_ptr<char> demangled_name;
- gdb::unique_xmalloc_ptr<char> ret;
- struct demangle_component *ret_comp;
- demangle_parse_info_up info
- = mangled_name_to_comp (physname, DMGL_ANSI, &storage, &demangled_name);
-
- if (info == nullptr)
- return nullptr;
-
- ret_comp = unqualified_name_from_comp (info->tree);
-
- if (ret_comp != NULL)
- /* The ten is completely arbitrary; we don't have a good
- estimate. */
- ret = cp_comp_to_string (ret_comp, 10);
-
- xfree (storage);
- return ret.release ();
-}
-
/* If FULL_NAME is the demangled name of a C++ function (including an
arg list, possibly including namespace/class qualifications),
return a new string containing only the function name (without the
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index 2263d5b725c0..00703c52c880 100644
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -93,8 +93,6 @@ extern gdb::unique_xmalloc_ptr<char> cp_canonicalize_string_full
extern gdb::unique_xmalloc_ptr<char> cp_class_name_from_physname
(const char *physname);
-extern char *method_name_from_physname (const char *physname);
-
extern unsigned int cp_find_first_component (const char *name);
extern unsigned int cp_entire_prefix_len (const char *name);
base-commit: 5cf59e5560bd1c2756427f55d4290dff7b4a4d56
--
2.56.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-14 20:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 19:59 [pushed] gdb: remove method_name_from_physname Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox