This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [RFC] gdb_realpath causes problems with GVD


>>>>> "Joel" == Joel Brobecker <brobecker@ACT-Europe.FR> writes:

Joel> I think it is wrong to force the user to follow links (I'm
Joel> trying to find a not so strong way to voice my opinion, but not
Joel> being a native speaker I can't find any).

I don't understand.

The way things stand right now, if the user uses an absolute path,
then realpath is used to determine whether the file matches.  Note
that any absolute path will work here.

If the user provides a relative path -- which is indeed what most
humans, as opposed to GUI wrappers, actually do -- then the realpath
stuff isn't used.

So users can always use the file name that they know (the one that is
in their Makefile), and gdb will understand.  I don't see when a user
would be forced to follow a link.

The case that is causing you problems is when gdb prints the real file
name, and then the user tries to set a breakpoint using just the
basename of that file name.  This seems like an unlikely scenario to
me.

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

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

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

If it doesn't affect the feature I care about, then it doesn't matter
to me.  The feature in question is having a way to tell gdb
unambiguously which file a breakpoint should appear in.  The current
mechanism for this is to use an absolute path.

Another choice would be to compare what the user types in against the
basename of the realpath.  This isn't any more ambiguous than what
already goes on in the relative-path case.  This would work around the
GVD bug, and it wouldn't affect the full-path case.

Tom


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