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] fullname attribute for GDB/MI stack frames


> Date: Mon, 2 May 2005 17:20:43 -0400
> From: Bob Rossi <bob@brasko.net>
> 
> The question is, will GDB will return \abc or d:foo from source.c:openp?

Yes.

> I see that IS_ABSOLUTE_PATH is being used, which specifically says it
> allows the case \abc and d:foo. 

Exactly.

> So, the next question is, does xfullpath change \abc or d:foo into a 
> real absolute path or not?

It can't do anything with \abc (except perhaps convert it into /abc,
but that's not a given).  For d:foo, it converts it into d:./foo,
which is still not 100% absolute, but xfullpath cannot do anything
about it, since it doesn't know how to resolve "." (i.e., what was the
cwd at the time of the compilation).

> Notice the comment in utils.c:3021
> 
> #ifdef HAVE_DOS_BASED_FILE_SYSTEM
>   /* We need to be careful when filename is of the form 'd:foo', which
>      is equivalent of d:./foo, which is totally different from d:/foo.  */
>   if (strlen (dir_name) == 2 && isalpha (dir_name[0]) && dir_name[1] == ':')
>     {
>       dir_name[2] = '.';
>       dir_name[3] = '\000';
>     }
> #endif
> 
> That above comment broke my brain :)

If you mean that it isn't clear, let me know and I will try to
clarify.


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