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] |
Hello, I implemented the new xfullpath function based on Andrew's comments, and made some adjustements to fix the problem reported in http://sources.redhat.com/ml/gdb-patches/2002-03/msg00345.html while being careful not to break Tom's setup. The patch is attached. I also implemented a new test for it (see attached: xfullpath.exp). I verified that it does not introduce any regression on x86-linux. I have a question: I replaced some calls to xfree by a call to make_cleanup, because there were several exit paths in the procedure. Using make_cleanup is probably less efficient, but it makes the code more robust (less likely to have a memory leak), and easier to read. Is this fine? ChangeLog entry for gdb: 2002-03-30 J. Brobecker <brobecker@gnat.com> * utils.c (xfullpath): New function. * defs.h (xfullpath): Add declaration. * source.c (openp): Use xfullpath in place of gdb_realpath to avoid resolving the basename part of filenames when the associated file is a symbolic link. This fixes a potential inconsistency between the filenames known to GDB and the filenames it prints in the annotations. * symtab.c (lookup_symtab): Use the new xfullpath function, in order to be able to match a filename with either the real filename, or the name of any symbolic link to this file. (lookup_partial_symtab): Ditto. The ChangeLog for gdb/testsuite: 2002-03-30 J. Brobecker <brobecker@gnat.com> * gdb.base/xfullpath.exp: New test, to exercise the new xfullpath () function. -- Joel
Attachment:
xfullpath.diff
Description: Text document
Attachment:
xfullpath.exp
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |