public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/30934] New: Stopping at a breakpoint takes minutes if a source file has long lines
@ 2023-10-02 18:57 hi-angel at yandex dot ru
  2023-10-02 22:54 ` [Bug gdb/30934] " tromey at sourceware dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: hi-angel at yandex dot ru @ 2023-10-02 18:57 UTC (permalink / raw)
  To: gdb-prs

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.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-10-12  9:18 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-02 18:57 [Bug gdb/30934] New: Stopping at a breakpoint takes minutes if a source file has long lines hi-angel at yandex dot ru
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

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).