public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "jwaffe75 at gmail dot com" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-26213-4717@http.sourceware.org/bugzilla/> (raw)

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

            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=12686&action=edit
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 having
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 breakpoint
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 can't
be 
                found
11:20 < jwaffe> and if I try and set a breakpoint using b test.c:15, it seems
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 as it
is the same as the compilation dir. Nonetheless, I think this bugworthy.
["list" 
                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 that is
equivalent is supposed to work (it does for me -- 
                "/home/keiths/tmp/multiname/a/../test.c:3" does work.
< jwaffe> Interesting, b /home/me/a_dev/multifile_gdb/a/../test.c:13 does not
work for me, though

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

                 reply	other threads:[~2020-07-07 16:04 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=bug-26213-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).