Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@ACT-Europe.FR>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] gdb_realpath causes problems with GVD
Date: Mon, 25 Mar 2002 01:22:00 -0000	[thread overview]
Message-ID: <20020325102204.A1974@act-europe.fr> (raw)
In-Reply-To: <87663mo5uh.fsf@creche.redhat.com>; from tromey@redhat.com on Sat, Mar 23, 2002 at 11:08:38PM -0700

> Yes.  The problem here is that gdb is giving an absolute path to GVD.
> GVD then sends just the basename back to gdb.  This doesn't really
> make sense.

Right, and the GVD team is now aware of this issue. Let's now leave GVD
out of the picture, as it was the tool that uncovered the issue, but the
issue is actually independent from GVD.

> Suppose I'm editing this file in Emacs.  Emacs, at least as I have it
> configured, likes to follow symlinks.  So Emacs thinks the file is
> "/a/b/toto.C".
> 
> In the symtab we have "toto.c".  We compiled it in the directory "/c/d"
> using `gcc -c -g toto.c'.
> 
> Now in Emacs I use C-x SPC to set a breakpoint in toto.C.  Emacs
> (well, a hacked version that works with this feature) sends:
> 
>     b /a/b/toto.C:57
> 
> Currently gdb will search through the symtabs.  It will see something
> `toto.c' and use realpath to turn it into /a/b/toto.C.  And since
> this is equal to the argument to `b', the breakpoint will be set.
> 
> With your proposed change, when we're searching through the symtabs
> we'll find `toto.c' and turn it into `/a/b/toto.c'.  This isn't equal
> to the argument to `b', so gdb will give an error.

I think it is wrong to force the user to follow links (I'm trying to
find a not so strong way to voice my opinion, but not being a native
speaker I can't find any). There are some development systems where the
links are automagically, and the user sometimes does not know about
them.

Let me suggest the following: 
  - Use xfullpath when printing the filename in "info line"
  - Try both xfullpath and then  gdb_realpath when setting breakpoints.

That way, we remain consistent between the filenames known to the user,
the filenames displayed by GDB, but at the same time being lenient in
what we accept.

What do you think? Would that work for you?
-- 
Joel


  reply	other threads:[~2002-03-25  9:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-19  8:12 Joel Brobecker
2002-03-19  9:17 ` Eli Zaretskii
2002-03-19  9:34   ` Daniel Jacobowitz
2002-03-19  9:56     ` Joel Brobecker
2002-03-19 11:18     ` Eli Zaretskii
2002-03-19 12:14       ` Joel Brobecker
2002-03-19 22:04         ` Eli Zaretskii
2002-03-20  1:15           ` Joel Brobecker
2002-03-20  3:12             ` Eli Zaretskii
2002-03-20  4:05               ` Joel Brobecker
2002-03-20 10:25                 ` Eli Zaretskii
2002-03-20  8:10               ` Andrew Cagney
2002-03-20  9:41                 ` Joel Brobecker
2002-03-19 10:29 ` Andrew Cagney
2002-03-19 14:28   ` Joel Brobecker
2002-03-20 14:16 ` Tom Tromey
2002-03-21  0:11   ` Joel Brobecker
2002-03-21  3:44     ` Joel Brobecker
2002-03-23 21:35       ` Tom Tromey
2002-03-25  1:22         ` Joel Brobecker [this message]
2002-03-25  9:23           ` Tom Tromey
2002-03-25 10:01             ` Joel Brobecker
2002-03-27 19:36               ` Andrew Cagney
2002-03-27 19:42                 ` Daniel Jacobowitz
2002-03-23 21:13     ` Tom Tromey

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=20020325102204.A1974@act-europe.fr \
    --to=brobecker@act-europe.fr \
    --cc=gdb-patches@sources.redhat.com \
    --cc=tromey@redhat.com \
    /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