public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "hi-angel at yandex dot ru" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/30934] New: Stopping at a breakpoint takes minutes if a source file has long lines
Date: Mon, 02 Oct 2023 18:57:56 +0000	[thread overview]
Message-ID: <bug-30934-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=30934

            Bug ID: 30934
           Summary: Stopping at a breakpoint takes minutes if a source
                    file has long lines
           Product: gdb
           Version: 13.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: hi-angel at yandex dot ru
  Target Milestone: ---

Created attachment 15149
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15149&action=edit
testcase

No idea why it's taking so long, given I do not execute any commands that would
trigger showing these long lines, but debugging such a file with gdb is nigh
impossible. After showing an initial message that it's about to stop on a
breakpoint it just hangs for many minutes with 100% CPU load.

# Steps to reproduce

1. Download the attached file
2. Run commands:

    $ g++ test.cpp -o a -g3 -O0
    $ gdb -q --nx ./a
    Reading symbols from ./a...
    (gdb) br 56
    Breakpoint 1 at 0x1564: file test.cpp, line 56.
    (gdb) r
    Starting program: /tmp/a

    This GDB supports auto-downloading debuginfo from the following URLs:
      <https://debuginfod.archlinux.org>
    Enable debuginfod for this session? (y or [n])
    Debuginfod has been disabled.
    To make this setting permanent, add 'set debuginfod enabled off' to
.gdbinit.
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".

    Breakpoint 1, Solution::numOfSubarrays (this=0x7ffffff9c076,
arr=std::vector of length 100000, capacity 100000 = {...}) at test.cpp:56

## Expected

After stopping at breakpoint 1 it immediately gives the prompt for typing
further commands

## Actual

It the `Breakpoint 1` text appears, it just hangs for many minutes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2023-10-02 18:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 18:57 hi-angel at yandex dot ru [this message]
2023-10-02 22:54 ` [Bug gdb/30934] " tromey at sourceware dot org
2023-10-03  4:08 ` hi-angel at yandex dot ru
2023-10-03  4:15 ` hi-angel at yandex dot ru
2023-10-03  8:30 ` vries at gcc dot gnu.org
2023-10-03  8:49 ` vries at gcc dot gnu.org
2023-10-03  9:21 ` vries at gcc dot gnu.org
2023-10-03  9:23 ` vries at gcc dot gnu.org
2023-10-03 16:34 ` tromey at sourceware dot org
2023-10-03 21:07 ` vries at gcc dot gnu.org
2023-10-03 21:25 ` vries at gcc dot gnu.org
2023-10-05  6:35 ` vries at gcc dot gnu.org
2023-10-10 11:12 ` vries at gcc dot gnu.org
2023-10-11  7:28 ` vries at gcc dot gnu.org
2023-10-11 12:06 ` [Bug cli/30934] " vries at gcc dot gnu.org
2023-10-11 13:44 ` vries at gcc dot gnu.org
2023-10-11 17:10 ` hi-angel at yandex dot ru
2023-10-11 17:43 ` vries at gcc dot gnu.org
2023-10-12  9:18 ` sam at gentoo dot org

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=bug-30934-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).