From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1D58138582A4; Mon, 2 Oct 2023 18:57:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D58138582A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1696273077; bh=p+cz25z0zlg6Nopp3SfP+Nvn+APbAjb0zcVAtAIwOSk=; h=From:To:Subject:Date:From; b=e2I//ebXaGDXE0HncLPozvY7BnsW0lfOHyJXbjcTq7VqMcM48UIsnxXmKFjWcxMLM dcJle4f6rfpzVFxLq1y/zj3dpn3I+EQnaOF+gOkCHzjBzn5ecuUVL7l53gSyK2EJ0E C8J+neCRK7hTk/RT+VlW1TnIHsxpF0+XJQISWF5g= From: "hi-angel at yandex dot ru" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hi-angel at yandex dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30934 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=3D15149&action=3Ded= it testcase No idea why it's taking so long, given I do not execute any commands that w= ould 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: 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=3D0x7ffffff9c076, arr=3Dstd::vector of length 100000, capacity 100000 =3D {...}) 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. --=20 You are receiving this mail because: You are on the CC list for the bug.=