This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[cancel] Re: [patch] Parent dirs of non-existing CU current dirs
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 26 Apr 2008 15:42:19 +0200
- Subject: [cancel] Re: [patch] Parent dirs of non-existing CU current dirs
- References: <20080426131556.GA15844@host0.dyn.jankratochvil.net>
Hi,
please disregard the previous letter.
One cannot easily trim `..'s as besides of forgotten `.' one cannot expect
where the parent directory points as the previous directory may have been
a symlink to a directory.
There really should exist the empty directories referencing their parents.
Sorry,
Jan
On Sat, 26 Apr 2008 15:15:56 +0200, Jan Kratochvil wrote:
> Hi,
>
> (gdb) up
> #1 0x00007f79042e1ee4 in PR_WaitCondVar (cvar=0x14196f0, timeout=4294967295)
> at ../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c:405
> 405 ../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c: No such file or directory.
> in ../../../mozilla/nsprpub/pr/src/pthreads/ptsynch.c
>
> /usr/lib/debug/lib64/libnspr4.so.debug
> <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
> <11> DW_AT_name : (indirect string, offset: 0x7d): ../.././mozilla/nsprpub/pr/src/prvrsion.c
> <15> DW_AT_comp_dir : (indirect string, offset: 0x14c): /usr/src/debug/nspr-4.7.0.99.2/pr/src
>
> ls: cannot access /usr/src/debug/nspr-4.7.0.99.2/pr/src/../.././mozilla/nsprpub/pr/src/prvrsion.c: No such file or directory
> ls: cannot access /usr/src/debug/nspr-4.7.0.99.2/pr/src: No such file or directory
> -rw-r--r-- 1 root root 4715 2004-04-25 11:00 /usr/src/debug/nspr-4.7.0.99.2/./mozilla/nsprpub/pr/src/prvrsion.c
> -rw-r--r-- 1 root root 4715 2004-04-25 11:00 /usr/src/debug/nspr-4.7.0.99.2/mozilla/nsprpub/pr/src/prvrsion.c
>
> We should not insist the current directory of CU exists as it may be omitted if
> it would be empty. The other opinion may be there is a bug in the debuginfo
> generator and the empty directories should still exist there. One may also
> normalize the directories listed in the debuginfo files.
>
> No regressions on x86_64-fedora-9.
>
>
> Regards,
> Jan
> 2008-04-26 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> Find sources in parent dirs of non-existing CU current dirs.
> * defs.h (gdb_trim_dir_parents): New prototype.
> * utils.c (gdb_trim_dir_parents): New function.
> * source.c (openp): Call GDB_TRIM_DIR_PARENTS.
>
> 2008-04-26 Jan Kratochvil <jan.kratochvil@redhat.com>
>
> * gdb.base/nodir.exp, gdb.base/nodir.c: New files.