Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Doug Evans" <dje@google.com>
To: "Aleksandar Ristovski" <ARistovski@qnx.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies
Date: Sun, 06 Jan 2008 18:44:00 -0000	[thread overview]
Message-ID: <e394668d0801061043i5f2ae0a8k37393d196aba6d3@mail.gmail.com> (raw)
In-Reply-To: <2F6320727174C448A52CEB63D85D11F40A5A@nova.ott.qnx.com>

On Jan 5, 2008 10:43 PM, Aleksandar Ristovski <ARistovski@qnx.com> wrote:
> > > I took an easy out in scanning for a match, I just pick the first.  I
> > > can add the requisite code if folks think this is the way to go.
>
> I would think that yes, we need to do more to try "perfect" v.s. "less than
> perfect" matches.

Yep.  That's an "implementation detail left for later" :-).  I wanted
to make sure the rest of the patch was "typing in the right direction"
first.

> I still believe we should do the following (I am assuming cu_file_name is an
> absolute path).

In the patch cu_file_name might not be an absolute path, but combined
with comp_dir generally it is.

> 1) Compare cu_file_name and fname; make sure fname is absolute, concat if
> needed. They match? Great - pick that one.
>
> 2) Try less than perfect match: compare base names; Loop, however, through
> all and see if exactly one match exists. If yes, great - pick that one.
>
> 3) If neither 1 or 2 worked, try with compacting absolute paths and
> comparing compacted paths. If it matches, pick that one. If not... don't
> know.
>
> Note: I don't think possibility of symlinks will spoil step 3. We simply try
> to match compiler's idea about what it saw. I.e., at this point we are
> playing with paths only (we can think of them as logical paths since
> physical paths at this point may not exist at all on the host system where
> gdb is running. In fact, we do not really care what the physical path is we
> just want to reconstruct what compiler thought it compiled).

(3) is where the fun begins, and symlinks can spoil things, but at
this point we're into heuristic-land so things are already spoiled.


  reply	other threads:[~2008-01-06 18:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-06  6:44 Aleksandar Ristovski
2008-01-06 18:44 ` Doug Evans [this message]
2008-01-08 16:10 Aleksandar Ristovski
2008-01-08 16:19 ` Daniel Jacobowitz
2008-01-08 17:33 ` Doug Evans
2008-01-08 16:34 Aleksandar Ristovski
2008-01-08 16:46 ` Daniel Jacobowitz
2008-01-08 20:28 Aleksandar Ristovski
2008-01-08 20:33 ` Daniel Jacobowitz
2008-01-08 21:24 Aleksandar Ristovski
2008-01-08 21:32 ` Daniel Jacobowitz
2008-01-08 21:26 Aleksandar Ristovski
2008-01-08 21:51 Aleksandar Ristovski
2008-01-08 21:57 ` Daniel Jacobowitz
2008-04-08 16:37 Aleksandar Ristovski
2008-04-09 14:55 Aleksandar Ristovski
2008-04-09 20:52 ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e394668d0801061043i5f2ae0a8k37393d196aba6d3@mail.gmail.com \
    --to=dje@google.com \
    --cc=ARistovski@qnx.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox