From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2EDF33857825; Tue, 5 Apr 2022 14:38:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2EDF33857825 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/15934] Keep directories for argv[0] Date: Tue, 05 Apr 2022 14:38:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW 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: cc Message-ID: In-Reply-To: References: 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, 05 Apr 2022 14:38:40 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D15934 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at sourceware dot o= rg --- Comment #1 from Tom Tromey --- I have a somewhat similar problem. Suppose the user does 'file zzz', where zzz is a symlink. Then, after running, the user resets the symlink to point to some other file. In this case, gdb won't change -- because the realpath'ing in the objfile creation path will wind up resolving the symlink, and so reread_symbols will think nothing has changed. Locally this is complicated by the fact that we have a workaround for the Windows gnulib/BFD stat mismatch bug in place. I think my partial solution will be to remove OPF_RETURN_REALPATH from symfile_bfd_open. A full solution for this bug would probably involve storing the user-specified name in the objfile and then changing various spots in gdb to use that. That is, the objfile would need one name and the BFD would get another. --=20 You are receiving this mail because: You are on the CC list for the bug.=