public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/4] Remove split_style::UNDERSCORE
Date: Tue, 21 Nov 2023 14:09:27 -0700	[thread overview]
Message-ID: <20231121-ada-lookup-perf-v1-3-1efd2d1dbf65@adacore.com> (raw)
In-Reply-To: <20231121-ada-lookup-perf-v1-0-1efd2d1dbf65@adacore.com>

The recent changes to the way Ada names are matched means that
split_style::UNDERSCORE is no longer used.  This patch removes it.
---
 gdb/split-name.c | 13 -------------
 gdb/split-name.h |  2 --
 2 files changed, 15 deletions(-)

diff --git a/gdb/split-name.c b/gdb/split-name.c
index 0805cb82700..4ef022cf58e 100644
--- a/gdb/split-name.c
+++ b/gdb/split-name.c
@@ -45,19 +45,6 @@ split_name (const char *name, split_style style)
 	}
       break;
 
-    case split_style::UNDERSCORE:
-      /* Handle the Ada encoded (aka mangled) form here.  */
-      for (const char *iter = strstr (name, "__");
-	   iter != nullptr;
-	   iter = strstr (iter, "__"))
-	{
-	  result.emplace_back (&name[previous_len],
-			       iter - &name[previous_len]);
-	  iter += 2;
-	  previous_len = iter - name;
-	}
-      break;
-
     case split_style::DOT_STYLE:
       /* D and Go-style names.  */
       for (const char *iter = strchr (name, '.');
diff --git a/gdb/split-name.h b/gdb/split-name.h
index ad2862e222d..2674c9b8d27 100644
--- a/gdb/split-name.h
+++ b/gdb/split-name.h
@@ -33,8 +33,6 @@ enum class split_style
   /* Split at ".".  Used by Ada, Go, D.  This has a funny name to work
      around a bug in Bison 2.3, which is used on macOS.  */
   DOT_STYLE,
-  /* Split at "__".  Used by Ada encoded names.  */
-  UNDERSCORE,
 };
 
 /* Split NAME into components at module boundaries.  STYLE indicates

-- 
2.41.0


  parent reply	other threads:[~2023-11-21 21:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 21:09 [PATCH 0/4] Improve Ada name lookup performance Tom Tromey
2023-11-21 21:09 ` [PATCH 1/4] Improve performance of Ada name searches Tom Tromey
2023-11-21 21:09 ` [PATCH 2/4] Always use expand_symtabs_matching in ada-lang.c Tom Tromey
2023-11-21 21:09 ` Tom Tromey [this message]
2023-11-21 21:09 ` [PATCH 4/4] Remove quick_symbol_functions::expand_matching_symbols Tom Tromey
2023-12-06 17:01 ` [PATCH 0/4] Improve Ada name lookup performance Tom Tromey
2023-12-06 17:04   ` 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=20231121-ada-lookup-perf-v1-3-1efd2d1dbf65@adacore.com \
    --to=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).