From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A88193857C66; Tue, 7 Jul 2020 16:04:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A88193857C66 From: "jwaffe75 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/26213] New: In a directory with several subdirectories containing files with the same name, I can't set a breakpoint on a file in the root directory Date: Tue, 07 Jul 2020 16:04:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: 9.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jwaffe75 at gmail dot com 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 16:04:06 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26213 Bug ID: 26213 Summary: In a directory with several subdirectories containing files with the same name, I can't set a breakpoint on a file in the root directory Product: gdb Version: 9.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: breakpoints Assignee: unassigned at sourceware dot org Reporter: jwaffe75 at gmail dot com Target Milestone: --- Created attachment 12686 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D12686&action=3Ded= it an archive of the master branch of the github repository that contains all files needed to demonstrate the issue, plus a readme (if you prefer to not = have external links as a sole reference for bugs) Please see https://github.com/superlazyname/GDB_FileBreakpoint/ for a demo. I brought this up in the GDB IRC on freenode, 11:14 < jwaffe> Hello, I have a question (or maybe I found a bug); I'm havi= ng trouble figuring out how to set a breakpoint in a certain situation where I have several files with the same name 11:15 < jwaffe> my setup looks like this: ./test.c, ./a/test.c, ./b/test.c, ./c/test.c, I can set a breakpoint in ./a/test.c, ./b/test.c, and ./c/test.= c, but no matter what I do, I can't seem to set any breakpoints in ./test.c 11:16 < jwaffe> if I rename ./test.c to ./test_rename.c, I can set a breakp= oint with either b test_rename:c:15 or b /home/me/path/to/test_rename.c:15, but /home/me/path/to/test.c:15 will not work, it'll just say the source file ca= n't be=20 found 11:20 < jwaffe> and if I try and set a breakpoint using b test.c:15, it see= ms to set the breakpoint in ./a/test.c, ./b/test.c and ./c/test.c, but not ./test.c 11:42 < jwaffe> Here's a link to a github repo demonstrating it if it helps https://github.com/superlazyname/GDB_FileBreakpoint/ 11:46 < keiths> jwaffe: Yeah, that looks like a problem... I can easily reproduce here on master. I can, however, set a break using path, as long a= s it is the same as the compilation dir. Nonetheless, I think this bugworthy. ["list"=20 works, but "break" does not.] 11:52 < jwaffe> keiths thanks for looking into it! 11:52 < jwaffe> where should I report this? 11:52 < keiths> sourceware.org/bugzilla, for gdb category "breakpoints" 11:55 < keiths> As a *bad* workaround, play with the path. Check DW_AT_comp= _dir for ./test.c. Using exactly that should work. [And even using something tha= t is equivalent is supposed to work (it does for me --=20 "/home/keiths/tmp/multiname/a/../test.c:3" does work. < jwaffe> Interesting, b /home/me/a_dev/multifile_gdb/a/../test.c:13 does n= ot work for me, though --=20 You are receiving this mail because: You are on the CC list for the bug.=