Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Vladimir Prus <ghost@cs.msu.su>, gdb@sources.redhat.com
Subject: Re: Filename with "./" in breakpoint command
Date: Mon, 05 Dec 2005 18:56:00 -0000	[thread overview]
Message-ID: <20051205185556.GA9808@nevyn.them.org> (raw)
In-Reply-To: <uk6ej9ymu.fsf@gnu.org>

On Mon, Dec 05, 2005 at 08:39:37PM +0200, Eli Zaretskii wrote:
> Thanks.
> 
> Looking at symtab.c:lookup_symtab, I see that we simply don't try to
> look for anything but the exact match when given a relative file name
> such as "./tracepoints.cpp".
> 
> I'm not sure this is a bug; the idea of asking the user to chdir into
> the right directory and then use "./foo" to distinguish between
> several namesake files doesn't sound like a very user-friendly design,
> not really a big improvement over asking them to specify a full
> absolute file name of the source (in which case it does work for you,
> does it?).
> 
> Perhaps we should modify the lookup_symtab to not return immediately
> after finding the first matching tail (near line 174 in symtab.c), but
> instead see if there's more than one match, and if so, ask the user
> which one she wants.  What do you think?

Or, when the existing lookups have failed for a relative pathname,
canonicalize it and treat it like a full path?

I don't think adding more user interaction at this level is a good idea
- it's too far away from the user commands, in GDB's internals.  It's
been back-burnered for lack of time, but I was working on patches to
handle location lookups returning more than one location; e.g. setting
breakpoints at all locations matching tracepoints.cpp:25.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  reply	other threads:[~2005-12-05 18:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-03 12:58 Vladimir Prus
2005-12-03 14:17 ` Eli Zaretskii
2005-12-03 14:22   ` Bob Rossi
2005-12-03 14:55     ` Eli Zaretskii
2005-12-03 15:01       ` Bob Rossi
2005-12-05  6:53   ` Vladimir Prus
2005-12-05 18:39     ` Eli Zaretskii
2005-12-05 18:56       ` Daniel Jacobowitz [this message]
2005-12-06  4:27         ` Eli Zaretskii
2005-12-06  4:55           ` Daniel Jacobowitz
2005-12-06 11:56             ` Bob Rossi
2005-12-06 14:01               ` Joel Brobecker
2005-12-06 14:26                 ` Andrew STUBBS
2005-12-06 20:13               ` Eli Zaretskii
2005-12-06 20:11             ` Eli Zaretskii
2005-12-06 20:17               ` Daniel Jacobowitz
2005-12-06 21:02                 ` Eli Zaretskii
2005-12-06 21:09                   ` Daniel Jacobowitz
2005-12-06 22:32                     ` Eli Zaretskii
2005-12-07  7:49                     ` Vladimir Prus
2005-12-07 14:51                       ` Daniel Jacobowitz
2005-12-07 16:46                         ` Vladimir Prus
2005-12-08 20:53                           ` Paul Gilliam
2005-12-03 14:19 ` Bob Rossi

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=20051205185556.GA9808@nevyn.them.org \
    --to=drow@false.org \
    --cc=eliz@gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=ghost@cs.msu.su \
    /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