Bug 15652 - full symlink resolution prevents gdb from finding fission dwp files
Summary: full symlink resolution prevents gdb from finding fission dwp files
Status: RESOLVED DUPLICATE of bug 15415
Alias: None
Product: gdb
Classification: Unclassified
Component: symtab (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-19 20:25 UTC by dje
Modified: 2023-11-23 17:23 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dje 2013-06-19 20:25:03 UTC
GDB expects to be able to find a binary's dwp file in the same directory as the binary.  [gdb will also search debug-file-directory, but it first looks in the same directory as the binary] But if the binary is actually a symlink to a file in a different directory than the dwp file, then things break.

Fission ref: http://gcc.gnu.org/wiki/DebugFission

Repro:
1) build binary + binary.dwp
2) mkdir foo
3) ln -s ../binary foo/binary
4) mv binary.dwp foo
5) gdb foo/binary
-->
gdb can't find binary.dwp
Comment 1 Tom Tromey 2022-04-05 18:33:24 UTC
This works for me:

Reading symbols from ./Subdir/a...
(gdb) maint info bfd
Refcount   Address            Filename                                 
2          0x2fa4b10          /tmp/QQ/Subdir/a.dwp                     
2          0x2f7ac70          /tmp/QQ/./Subdir/a                       


I suspect it was fixed in bug #15415.

*** This bug has been marked as a duplicate of bug 15415 ***