This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/15934] New: Keep directories for argv[0]


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    <null>            /home/pedro/gdb/mygit/build/gdb/./gdbserver/../gdb
   2    <null>            /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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]