public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2020-07-07 16:04 jwaffe75 at gmail dot com
0 siblings, 0 replies; only message in thread
From: jwaffe75 at gmail dot com @ 2020-07-07 16:04 UTC (permalink / raw)
To: gdb-prs
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-07 16:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 16:04 [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 jwaffe75 at gmail dot com
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).