From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1885 invoked by alias); 5 Sep 2013 13:07:15 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 1857 invoked by uid 48); 5 Sep 2013 13:07:15 -0000 From: "jan.kratochvil at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/15934] New: Keep directories for argv[0] Date: Thu, 05 Sep 2013 13:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: jan.kratochvil at redhat dot com X-Bugzilla-Status: NEW 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 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00319.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=15934 Bug ID: 15934 Summary: Keep directories for argv[0] Product: gdb Version: HEAD Status: NEW Severity: minor Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: jan.kratochvil at redhat dot com Re: [commit+7.6.1] [patch] [7.6.1] Fix argv[0] symlink regression (PR 15415) https://sourceware.org/ml/gdb-patches/2013-09/msg00138.html Message-ID: <52276600.7010706@redhat.com> 3 /home/pedro/gdb/mygit/build/gdb/./gdbserver/../gdb 2 /home/pedro/gdb/mygit/build/gdb/./gdb Problem #1: ./ could be removed/simplified. Problem #2: gdbserver/../ could be also removed/simplified But argv[0] should be kept possibly unchanged from the user input. This also means argv[0] should be kept in relative (not absolute pathname) form; but GDB should better display absolute pathnames to user, which will not match argv[0] much. Going to use gdb_realpath_keepfile() (former xfullpath()) so the directories get lost even for inferior argv[0]. Inferiors care only about exact basename in argv[0] anyway. The goal of this PR fix would be to pass argv[0] unchanged to inferior while still displaying it to user in both convenient (canonical absolute form) but also the exact argv[0] form (original form, even if relative). -- You are receiving this mail because: You are on the CC list for the bug.