Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Doug Evans <dje@google.com>
Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [rfc] Use substitute-path for filename portion too
Date: Fri, 08 Feb 2008 22:20:00 -0000	[thread overview]
Message-ID: <20080208221955.GA10092@caradoc.them.org> (raw)
In-Reply-To: <e394668d0802071630m5234adf4xa3b5adae7428fb04@mail.gmail.com>

On Thu, Feb 07, 2008 at 04:30:30PM -0800, Doug Evans wrote:
> There is one related issue that I'd like to get fixed.  If there are
> two files foo.c, and I want to set a breakpoint in one of them, there
> is currently no robust way to do that.  If DW_AT_name includes _some_
> directory information then it can work, i.e. I can say break
> bar/foo.c:3 and it will only find bar/foo.c even if there is
> baz/foo.c.  But this only works if DW_AT_name contains the requisite
> directory instead of DW_AT_comp_dir containing the entire directory.
> This can be achieved by specifying the path to gcc, e.g. gcc -c -g
> bar/foo.c -o bar/foo.o instead of (cd bar && gcc -c -g foo.c).
> 
> I think what should happen is that if I say "break bar/foo.c:3" then
> gdb should do the appropriate searching even if DW_AT_name is only
> "foo.c".  If there is a collision gdb should probably either give an
> error or give the user a choice - I can't imagine the user wanting to
> choose "all" but I suppose that could be an option.

I definitely agree that we need to improve handling of this case
(though I'm not sure it's related).

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2008-02-08 22:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07 17:47 Daniel Jacobowitz
2008-02-07 17:57 ` Joel Brobecker
2008-02-07 18:14   ` Daniel Jacobowitz
2008-02-07 18:28     ` Joel Brobecker
2008-02-07 18:51       ` Aleksandar Ristovski
2008-02-08 15:02       ` Eli Zaretskii
2008-02-08  0:31     ` Doug Evans
2008-02-08 22:20       ` Daniel Jacobowitz [this message]
2008-02-08 22:21 ` Daniel Jacobowitz

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=20080208221955.GA10092@caradoc.them.org \
    --to=drow@false.org \
    --cc=brobecker@adacore.com \
    --cc=dje@google.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