This is the mail archive of the gdb-patches@sourceware.org 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: [patch 4/9] TUI: Use internally fullname


On Tue, 22 Jan 2013 12:44:30 +0100, Eli Zaretskii wrote:
> > It is compilation directory (DW_AT_comp_dir) relative name (therefore CU's
> > DW_AT_name).
> 
> But then it means that directory is somewhere we could get at it,
> right?  And yet you said "has no compilation directory".  What am I
> missing?

It is doable but it is too expensive to resolve all the possible combinations.

The compilation directory is (possibly) different for every CU (~= symtab).
And due to the possibility of choosing arbitrary number of trailing path
components you need to resolve it for each one.

With 25000 source files, each one having approx. 10 path components, even
after the not yet posted dropped xfullpath optimization it means 2500000 stat
syscalls. This is 0.744s on my box just for the stat syscalls overhead, in GDB
it would sure be higher.

Sure this is all possible but I believe it is an add-on/different patchset
than this one, it is appropriate to cache all the info some way.
This patchset tries to fix some of the found bugs and rename some confusing
variables/fields in GDB.


> > Moreover recent GDBs allow to use also any trailing part, therefore not just
> > "break ./gdb.base/return.c:main" and "break return.c:main"
> > but also "break gdb.base/return.c".
> 
> It sounds strange to me to use "." to mean anything but GDB's current
> directory, but if that's a long living tradition, so be it.

I have noticed it because whole testsuite uses the ./gdb.base/return.c names.


Thanks,
Jan


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