public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Improve performance for C++ symbols expansion (Tom Tromey, BZ 787487).
Date: Sat, 27 Jun 2026 23:55:23 GMT	[thread overview]
Message-ID: <178260452304.1.4812157763002239019.rpms-gdb-3000de323b16@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : 3000de323b1634ca0b44ac38a3894fd2b09773af
            Author : Jan Kratochvil <jan.kratochvil@redhat.com>
            Date   : 2012-02-09T22:25:44+01:00
            Stats  : +60/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/3000de323b1634ca0b44ac38a3894fd2b09773af?branch=gdb-17.2-rebase-f44

            Log:
            Improve performance for C++ symbols expansion (Tom Tromey, BZ 787487).

- Install also gdb-gdb.py pretty printers.

---
diff --git a/gdb-expand-cxx-accel.patch b/gdb-expand-cxx-accel.patch
new file mode 100644
index 0000000..2737bfd
--- /dev/null
+++ b/gdb-expand-cxx-accel.patch
@@ -0,0 +1,46 @@
+https://bugzilla.redhat.com/show_bug.cgi?id=787487
+http://sourceware.org/ml/gdb-patches/2012-02/msg00112.html
+Subject: RFC: extend symtabs_from_filename skipping for C++
+
+I'd appreciate comments on this.  Barring comments I will check it in
+after a couple days.
+
+A while ago Doug committed a patch to change linespec to skip
+symtabs_from_filename when possible.  This was an important performance
+improvement.
+
+We got a bug report in Red Hat bugzilla asking that this be extended to
+C++ qualified names:
+
+    https://bugzilla.redhat.com/show_bug.cgi?id=787487
+
+This patch implements this idea.
+
+Built and regtested on x86-64 Fedora 15.
+
+Tom
+
+2012-02-08  Tom Tromey  <tromey@redhat.com>
+
+	* linespec.c (decode_line_internal): Skip symtabs_from_filename
+	when we have a C++ qualified name.
+
+diff --git a/gdb/linespec.c b/gdb/linespec.c
+index da88d17..3f53b8e 100644
+--- a/gdb/linespec.c
++++ b/gdb/linespec.c
+@@ -912,9 +912,11 @@ decode_line_internal (struct linespec_state *self, char **argptr)
+   /* First things first: if ARGPTR starts with a filename, get its
+      symtab and strip the filename from ARGPTR.
+      Avoid calling symtab_from_filename if we know can,
+-     it can be expensive.  */
++     it can be expensive.  We know we can avoid the call if we see a
++     single word (e.g., "break NAME") or if we see a qualified C++
++     name ("break QUAL::NAME").  */
+ 
+-  if (*p != '\0')
++  if (*p != '\0' && p[1] != ':')
+     {
+       TRY_CATCH (file_exception, RETURN_MASK_ERROR)
+ 	{
+

diff --git a/gdb.spec b/gdb.spec
index 9683f85..12813dd 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -28,7 +28,7 @@ Version: 7.4.50.%{snap}
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 11%{?_with_upstream:.upstream}%{?dist}
+Release: 12%{?_with_upstream:.upstream}%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
 Group: Development/Debuggers
@@ -532,6 +532,10 @@ Patch642: gdb-readline62-ask-more-rh.patch
 #=push
 Patch643: gdb-python-rdynamic.patch
 
+# Improve performance for C++ symbols expansion (Tom Tromey, BZ 787487).
+#=push
+Patch644: gdb-expand-cxx-accel.patch
+
 %if 0%{!?rhel:1} || 0%{?rhel} > 6
 # RL_STATE_FEDORA_GDB would not be found for:
 # Patch642: gdb-readline62-ask-more-rh.patch
@@ -797,6 +801,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
 %patch627 -p1
 %patch634 -p1
 %patch643 -p1
+%patch644 -p1
 
 %patch393 -p1
 %patch335 -p1
@@ -1103,6 +1108,9 @@ do
   touch -r $RPM_BUILD_DIR/%{gdb_src}/gdb/ChangeLog $i
 done
 
+mkdir -p $RPM_BUILD_ROOT/usr/lib/debug%{_bindir}
+cp -p $RPM_BUILD_DIR/%{gdb_src}/gdb/gdb-gdb.py $RPM_BUILD_ROOT/usr/lib/debug%{_bindir}/
+
 %if 0%{?rhel:1} && 0%{?rhel} <= 6
 %if 0%{!?_without_python:1}
 # Temporarily now:
@@ -1232,8 +1240,12 @@ fi
 %{_infodir}/gdb.info*
 
 %changelog
+* Thu Feb  9 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-12.fc17
+- Improve performance for C++ symbols expansion (Tom Tromey, BZ 787487).
+- Install also gdb-gdb.py pretty printers.
+
 * Thu Feb  9 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-11.fc17
-- Fix possible NULL crash in find_charset_names (Trom Tromey, BZ 786091).
+- Fix possible NULL crash in find_charset_names (Tom Tromey, BZ 786091).
 - [ppc*] Fix build failure due to GCC aliasing warning (BZ 786504).
 
 * Sat Jan 21 2012 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.4.50.20120120-10.fc17

                 reply	other threads:[~2026-06-27 23:55 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=178260452304.1.4812157763002239019.rpms-gdb-3000de323b16@fedoraproject.org \
    --to=jan.kratochvil@redhat.com \
    --cc=git-commits@fedoraproject.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